hello
i am trying to write a script that will compare the contents of a text box in a form, to a field in an access database.
if it matches, then proceed with the forms action, if not, display a message saying "please enter the correct password" or "please register"
i have gotten this far but i am getting an error:
<?
$membername=$POST['membername'];
$password=$POST['password'];
#connect to DSN
$connect=odbc_connect("user_details_input","","");
$task = "SELECT * FROM".
"[users_table] WHERE ".
"[membername] = '".$POST['membername'].
"' AND [password] = '".$POST['password']."'";
$result = odbc_execute($task);
$resultcount = odbc_record_rows ($result);
if ($resultcount == 1) {
Valid user
}
elseif ($resultcount > 1) {
Duplicate user in the DB
}
else {
Invalid user
}
?>
but i am geeting this error:
Warning: odbc_execute(): supplied argument is not a valid ODBC result resource in C:\XITAMI\webpages\22\test.php on line 24
Fatal error: Call to undefined function: odbc_record_rows() in C:\XITAMI\webpages\22\test.php on line 26