form variables

From: Date: Thu, 09 Nov 2000 10:14:42 +0000
Subject: form variables
Groups: php.general 
Request: Send a blank email to php-general+get-24463@lists.php.net to get a copy of this message
ofcourse I Did Actually the real problem is the below code is not working : <? $connection=mysql_connect("localhost","root","krishna") or die ("Couldn't connect to server"); $db1=mysql_select_db("isp",$connection) or die ("Couldn't connect to database"); $q1="select * from user where username='$loginname'"; $result1=mysql_query($q1,$connection) or die ("Couldn't execute query"); $num=mysql_num_rows($result1); $row=mysql_fetch_array($result1); if ($num!=0){ if ($password==$row["password"]){ echo ("Login Successful"); } else echo ("Sorry your password is wrong"); } else echo ("Sorry your name does not exist"); mysql_free_result($result1); mysql_close($connection); ?> Hence i tried to display the form variable 'loginname' but it is not displayed. Thanks for your response Anand Manik ----- Original Message ----- From: "Brian Clark" <brianj@fusionwerks.com> To: "Anand Manik" <amanik@im.eth.net> Cc: <php-general@lists.php.net> Sent: Thursday, November 09, 2000 3:17 PM Subject: Re: [PHP] form variables > Anand Manik wrote: > > >after submitting a form i cannot access the form variables in the next php > >file. > > > >i have tried displaying : > > > >echo ($loginname); > > > >but it does not work > > I'm guessing that you *did* wrap the above in <? ?> right? > > As in: > > <?php echo $loginname; ?> > > -Brian > > >please help > > > >Thanks > > > >Anand Manik >

« previous php.general (#24463) next »