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/