Re: Erratic isset()

From: Date: Sun, 01 Sep 2002 23:47:53 +0000
Subject: Re: Erratic isset()
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-21507@lists.php.net to get a copy of this message
In article <20020831080612.90154.qmail@pb1.pair.com>, stormhatten@telia.com 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

« previous php.db (#21507) next »