|
OK Sorted the last problem I having trouble adding a record to a customers database, can anyone see anything wrong with this code???
<?php
require_once('DbConnector.php');
if ($HTTP_POST_VARS){
$connector = new DbConnector();
$insertQuery = "INSERT INTO customers
(firstname,lastname,address)
VALUES
("."'".$HTTP_POST_VARS['firstname']."', "."'".$HTTP_POST_VARS['lastname']."',
".$HTTP_POST_VARS['address']."')";
if ($result = $connector->query($insertQuery)){
echo '<center><b>Article added to the database</b></center><br>';
}else{
exit('<center>Sorry, there was an error saving to the database</center>');
}
}
?>
I keep getting the Sorry... message
|