Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
The url for the form is http://www.lifegoesboom.com/open/index. ... =AddPerson. This is the code for the page that submits the data to the database:
Code: Select all
<?php
include "/open/mysql.php";
include "/open/functions/openconnection.php";
MYSQL_QUERY ("INSERT INTO `person` (`id`, `title`, `firstname`, `lastname`, `address1`, `address2`, `city`, `state`, `zipcode`, `homephone`, `workphone`, `mobilephone`, `emailaddress`, `spouse`, `child1`, `child2`, `child3`, `child4`, `child5`, `notes`, `amount`, `payments`)
VALUES
('$_POST[title]','$_POST[firstname]','$_POST[lastname]','$_POST[address1]','$_POST[address2]','$_POST[city]','$_POST[state]','$_POST[zipcode]','$_POST[hoemphone]','$_POST[workphone]','$_POST[mobilephone]','$_POST[emailaddress]','$_POST[spouse]','$_POST[child1]','$_POST[child2]','$_POST[child3]','$_POST[child4]','$_POST[child5]','$_POST[notes]','$_POST[amount]','$_POST[payments]')");
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record added";
include ('/open/functions/closeconnection.php');
?>Thank you!
-Tristan