i changed that code and i'm still getting errors but this time is new errors..
please see code
<?php
ob_start();
// Connect to server and select databse.
include ('conn.php');
// Define $myusername and $mypassword
$myusername=$POST['username'];
$mypassword=$POST['password'];
// To protect MySQL injection (more detail about MySQL injection)
$myusername = stripslashes($myusername);
$mypassword = stripslashes($mypassword);
$myusername = mysql_real_escape_string($myusername);
$mypassword = mysql_real_escape_string($mypassword);
$sql="SELECT * FROM members WHERE username='$myusername' and password='$mypassword'";
if(!$result) die ('Unable to run query:'.mysql_error());
$count=mysql_num_rows($result);
// If result matched $myusername and $mypassword, table row must be 1 row
if($count==1){
// Register $myusername, $mypassword and redirect to file "login_success.php"
echo $myusername;
$_SESSION['myusername'] = $myusername;
//header("location:login_success.php");
}
else {
echo "Wrong Email or Password";
//header("location:index.php?a='failed'");
}
ob_flush();
?>
and the result i got line in bold "unable to run query...
what did i missed!
AM