For one thing, you need quotes around the variables $ziplat and $ziplong in your SQL.
So instead of
Code:
$sql = "INSERT INTO stores (store_name, addr1, addr2, city, state, zip, phone, manager, notes, ziplat, ziplong) values('$store_name', '$addr1', '$addr2', '$city', '$state', '$zip', '$phone', '$manager', '$notes', $ziplat, $ziplong);";
It would be:
Code:
$sql = "INSERT INTO stores (store_name, addr1, addr2, city, state, zip, phone, manager, notes, ziplat, ziplong) values('$store_name', '$addr1', '$addr2', '$city', '$state', '$zip', '$phone', '$manager', '$notes', '$ziplat', '$ziplong');";
In case it's something besides that, what's the content of the DB class? If you're using PDO you can use the errorInfo() method to retrieve information on what the error was. So for example, if $db were the pdo object:
Code:
$errorData = $db->errorInfo();
echo "MySQL Error: " . $errorData[2];
Also, the mysql_error() function can retrieve the mysql errors.
Whatever you're using in the DB class, you can use those functions to get the error from the most recently executed function. If you do that and still need help, we can help you decipher the error message.
Bookmarks