WHERE (nickname = '$nickname') and (password = '$password')", $connection);
remember to place quotes around the value nickname = $nickname wont work but nickname = '$nickname' will do Hope that helps Nitin ----- Original Message ----- From: "electroteque" <[EMAIL PROTECTED]> To: "Togochog Enhebatu" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, February 28, 2004 2:54 AM Subject: RE: help on PHP code > well dude u never showed what the parser returned, i am pretty sure u need > curly brackets if u are including more than one line in an if statement > > -----Original Message----- > From: Togochog Enhebatu [mailto:[EMAIL PROTECTED] > Sent: Saturday, February 28, 2004 2:53 PM > To: [EMAIL PROTECTED] > Subject: help on PHP code > > > hi, > > Can any one help find the bug of the following code for me? I am new in > MySQL and PHP, and trying to varify the user ID and password. > > help is appreciated. > > batu, > > ************ > > > <!DOCTYPE HTML PUBLIC > "-//W3C//DTD HTML 4.0 Transitional//EN" > "http://www.w3.org/TR/html4/loose.dtd"> > <html> > <head><title>Customer Details</title></head> > <body bgcolor="green"> > <h1>Customer Details</h1> > > > <?php > > $nickname = $HTTP_POST_VARS['nickname']; > if(empty($nickname)) > echo '<br>nickname field should not be blank.'; > > $password = $HTTP_POST_VARS['password']; > if(empty($password)) > echo '<br>password field should not be blank.'; > ?> > > <?php > > $connection=mysql_connect("localhost","csc3223","abdasa"); > > mysql_select_db("csc3223",$connection); > > > $result=mysql_query("SELECT nickname,password,status FROM Exam_Provider > WHERE (n > ickname = $nickname) and (password = $password)", $connection); > > > while ($row = mysql_fetch_array($result)) > > { > echo "you have not been approved yet"; > } > > mysql_close($connection); > > ?> > > > <a href="form.html"><br><br>Return to the customer form</a> > </body> > </html> > > _________________________________________________________________ > Watch high-quality video with fast playback at MSN Video. Free! > http://click.atdmt.com/AVE/go/onm00200365ave/direct/01/ > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]