INSERT INTO ACESS DB
Posted: Fri Dec 11, 2009 5:16 pm
I'm trying to INSERT a new record into an ACCESS DB using PHP from a form, this is the code l have so far........
But i'm getting the following error.......
Warning: odbc_exec() expects parameter 1 to be resource, null given in C:\xampp\htdocs\lbm\searchupdate.php on line 8
What a l missing?
Code: Select all
$heading = $_POST['heading'];
$story = $_POST['story'];
$odbc = odbc_connect ('logisticsdb', 'root', '') or die('Could Not Connect to ODBC Database!');
$sql = "INSERT INTO Search (sHeading, sDescription) VALUES ('$heading', '$story')";
odbc_exec($odbc_connection, $sql) or die();
odbc_close($odbc);
Warning: odbc_exec() expects parameter 1 to be resource, null given in C:\xampp\htdocs\lbm\searchupdate.php on line 8
What a l missing?