Update of /cvsroot/openfirst/feedback/admin
In directory sc8-pr-cvs1:/tmp/cvs-serv22286
Modified Files:
index.php
Log Message:
Fix bug occuring when the same names are present on the feedback users form. Add some comments
Index: index.php
===================================================================
RCS file: /cvsroot/openfirst/feedback/admin/index.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** index.php 28 Jun 2003 01:02:06 -0000 1.2
--- index.php 29 Jul 2003 15:04:19 -0000 1.3
***************
*** 31,34 ****
--- 31,36 ----
if(isset($_POST["feedbackusers"])) {
echo("<p>The feedback users have been modified as per your request.</p>");
+ // Delete current users, as they will all be replaced with new users.
+ $query = mysql_query("DELETE FROM ofirst_feedbackusers;");
$line = explode("\n", $_POST["feedbackusers"]);
foreach ($line as $lin) {
***************
*** 36,39 ****
--- 38,42 ----
$femail = substr($lin, 0, strpos($lin, " "));
if(trim($fname) != "" && trim($femail) != "") {
+ // Create the new users for the feedback list
$query = mysql_query("INSERT INTO ofirst_feedbackusers (name, email) VALUES ('$fname', '$femail');");
}
***************
*** 61,63 ****
include($footer);
! ?>
\ No newline at end of file
--- 64,66 ----
include($footer);
! ?>
|