|
It is weird. It just happened a few days ago when I realized when entries weren't being added to the database. And the thing is I never made any changes.
$link = mysql_connect('localhost', 'username', 'password');
mysql_select_db('database');
$query = "INSERT INTO milleniumemails (firstname, lastname, fulladdress, telephone, dateofbirth, email, dateadded, specificevent) VALUES ('$firstname', '$lastname', '$fulladdress', '$telephone', '$dateofbirth', '$email', '$dateadded', '$specificevent')";
mysql_query($query);
The data comes from a form via POST:
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$address = $_POST['address'];
$city = $_POST['city'];
$state = $_POST['state'];
$zipcode = $_POST['zipcode'];
$dateofbirth = $_POST['dateofbirth'];
$telephone = $_POST['telephone'];
$email = $_POST['email'];
$specificevent = $_POST['specificevent'];
I used echo(mysql_error()); to get the error message - Unknown column and its still there for me at least. I wonder if its my host. HostGator.com I'm using.
|