In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > 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)):
If this is a copy and paste, you have here $Sumbit which is not $submit and also not $Submit. If this is not your problem, try echoing the variable in question to ensure that it contains what you expect it to contain. > > /* 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 > > > -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php