Erratic isset()
| From: | simon | Date: | Sat, 31 Aug 2002 08:06:14 +0000 |
| Subject: | Erratic isset() | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-21489@lists.php.net to get a copy of this message | ||
Hi
Can anyone shed some light on this problem?
The DB update only happens when I change the if(isset($submit)) to read
if(!isset($submit)).
Yes, I am using PHP 4.0.6 but have also tried with PHP 4.2.2, same problem.
Code snippet:
//HTML <body> ....
<?php
if(isset($Sumbit)):
/* Connecting, selecting database */
$link = mysql_connect("192.168.0.100", "sff_user", "sff98")
or die("Could not connect");
print "Connected successfully.<br>";
mysql_select_db("sff") or die("Could not select database");
$doit1 = "INSERT INTO members
VALUES(NULL,'$first_name','$last_name','$addr1',
'$addr2','$postnummer','$postort','$land','$tel','$mob','$email','$memb_date
','$comments')";
mysql_query($doit1); //put the data in members table
printf ("<b>Database updated.</b> Enter a new member?");
/* Closing connection */
mysql_close($link);
endif;
?>
//print HTML form etc...
Simon