little problem i need BIG help with someone please fix this for me i am begging you
thanks galvins2d
<?php
}
// The function which checks the input.
function userCheck($username, $passwd)
{
require("dbconnect.php");
// As 'passwd' is encrypted we need to use the 'PASSWORD()' function in our query
$query = "SELECT * FROM pass_protect WHERE username = '$username' AND
passwd = PASSWORD('$passwd')";
$result = mysql_db_query($db, $query, $connection) or die("Error in query."
.mysql_error());
// If 'username' and 'passwd' there will be one row ian the table which matches.
if(mysql_num_rows($result) == 1)
{
return 1;
}
else
{
return 0;
}
}
?>
THIS IS MY ERROR MESSAGE
Warning: mysql_db_query(): supplied argument is not a valid MySQL-Link resource in /home/galvin/public_html/guestbook/login.php on line 79
Error in query.