hey i need help with a login/register page. im having trouble on how to use the mysql_real_escape_string.
i’ve followed like 3 tuts already and it hasnt worked. here’s the code for the login. and yes all the post stuff is correct i didnt misspell anything.
$con = mysql_connect("mysql.x10hosting.com", "kishou", "password");
if (!$con)
{
die('Couldnt connect to Database' );
}
mysql_select_db("kishou", $con);
$username = mysql_real_escape_string($_POST['username']);
$password = mysql_real_escape_string($_POST['password']);
$result = mysql_query("SELECT * FROM registered_members");
$row = mysql_fetch_array($result);
if ($username==$row[ 'username']&&$password==$row[ 'Password'])
echo "Login successful";
else
die('Login failed');
mysql_close($con)