Here's my code:
$conn = odbc_connect( 'UserLog', 'root', '' );
$query = "SELECT FROM login WHERE username = '$username' AND password = '$password'";
$result = odbc_exec($conn, $query);
$num = odbc_num_rows($result);
if ($num != "0") {
echo "<p>You're authorized!</p>";
} else {
echo "<p>NOT authorized!</p>";
};
What am I doing wrong? I get:
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect., SQL state 37000 in SQLExecDirect in c:\sites\phpsite\login.php login.php on line 10
Warning: Supplied argument is not a valid ODBC result resource in c:\sites\phpsite\login.php\login.php on line 12
You're authorized!
Thanks for all help,
Justin