|
Post by jas389 on Oct 29, 2012 22:06:29 GMT -5
I am having trouble with when using include. I am trying to use include in my login function once my SQL statement verify's the username and password I call include so it will redirect the user to the my form for my sql statements when i run the login it shows a blank screen. I know my sql statement is right I have run it in phpadmin and it returns the correct info also I have put an echo statement inside the if statement and it prints so I know the SQL statement working properly. Is there something I am not under standing about include??
here is my login function <code> function login($username,$password) { $table="login"; $username=trim($username); $password =trim($password); $username = stripslashes($username); $password = stripslashes($password);
$username = mysql_real_escape_string($username); $password = mysql_real_escape_string($password);
$sqlConfrim = "SELECT * FROM $table WHERE userName = '$username' AND password = '$password'";
$result = mysql_query($sqlConfrim);
$count= mysql_num_rows($result); if($count == 1) { include 'hw7SQLState.php'; echo "hello"; //include 'homework1.php'; } else { echo "your not"; }//end of if }//end of function</code>
|
|