Okay, I have a database made from Access 2000. It has the columns ID and user_name. I'm just trying to check to see if the user already exists when trying to create a new account.
if ($dbc = odbc_connect("forum", "root", "")) {
$query = "SELECT ID FROM users WHERE user_name={$_POST['username']}";
if{$r = odbc_exec ($dbc,$query)} {
print "user already exists, try again";
}
odbc_close($dbc);
}
it says that I'm missing parameters in odbc_exec:
Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1., SQL state 07001 in SQLExecDirect in D:\wwwroot\register.php on line 23