Hi, I am now to PHP and probably have a very simple question.
All I want to do is display results from an Access database depending on what the user has entered in a text box e.g.
If the user has entered 'Preece' as an author, I want books written by Preece to be displayed:
$criteria=$REQUEST['criteria']; //criteria is a drop down list with either Author, title or ISBN
$textinput=$REQUEST['textinput']; //textinput is the text input box
if($criteria!=null)
{
switch($criteria)
{
case"Author":$strSQL="SELECT Title, ISBN, Author, Year FROM catalogue ORDER BY [title] WHERE Author = '". $textinput. "'";break;
}
}
I get the following error:
Warning: (null)(): Invoke() failed: Exception occurred. Source: Microsoft OLE DB Provider for ODBC Drivers Description: [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x158c Thread 0x1214 DBC 0xbf6304 Jet'. in e:\webareas\hr112\cmslibs\html\results.php on line 137
I presume I have written something wrong in the SQL statement. Any help pleae!
Thanks
Bex.