yeap im trying to check username and password..
i have like 10-100 users that intime will login.
is this the singel user login way?
but i have problem when i come to
$result = mysql_query($sql) or die("Query failed");
and then after i do not know what is the problem...
<?
$nickname=$POST["nickname"];
$password=$POST["password"];
$host = "localhost";
$username = "xxxx";
$password = "xxxx";
$connect = mysql_connect($host, "$username", "$password")
or die("Could not connect to MySQL!");
$db = mysql_select_db("flameline") or die("Could not select database");
$sql = "select * from reg_info where nickname = '$nickname' and password = '$password';";
$result = mysql_query($sql) or die("Query failed");
if (mysql_num_rows($result) > 1) {
print "<p><center><big><big>Welcome $nickname Please click <a href=\"index.html\"> here to continue</big></big></center></p>";
}
else
{
print "<p><center><big><big>Sorry, credentials supplied are incorrect.</big></big></center></p>";
}
?>
You are in