Parse error: syntax error, unexpected 'users' (T_STRING) in C:\websites\checklogin.php on line 10
users is the name of the table i'm trying to access. i would really appreciate any advice on what i'm doing wrong.
here's my code:
<?php
$un=$_POST['username'];
$pw=$_POST['password'];
//connect to the db
$user ='root';
$pswd ='october3';
$db ='BillMe';
$conn = mysql_connect('localhost',$user,$pswd);
mysql_select_db($db);
$sqlquery =“SELECT * FROM users WHERE username=$un AND password=$pw”;
$result = mysql_query($sqlquery) or die(“Unable to verify user because : ” . mysql_error());
if(mysql_num_rows($result) > 0){
echo 1; // for correct login response
}
else{
echo 0; // for incorrect login response
}
?>

New Topic/Question
Reply


MultiQuote






|