My form
http://sbehnke.digistatic.net/speedy/form.php
is made to insert data into the table. Here is the sql code for the table...
CREATE TABLE user_submissions
(user_id SERIAL PRIMARY KEY,
firstname NAME,
lastname NAME,
address1 TEXT,
address2 TEXT,
city TEXT,
state INTEGER REFERENCES states_lookup,
zipcode VARCHAR(10),
day_phone VARCHAR(14),
night_phone VARCHAR(14),
email TEXT,
best_time_call TEXT,
how_long TEXT,
monthly_income TEXT,
time_current_job TEXT,
date_of_birth DATE,
social_security VARCHAR(11) UNIQUE,
marital_status TEXT,
heard_how TEXT,
friend TEXT,
credit_auth TEXT,
time_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP);
Here is the PHP code to insert a record...
$sql = "INSERT INTO user_submissions(firstname, lastname,
address1, address2, city, state, zipcode,
email, how_long, day_phone, night_phone, best_time_call,
monthly_income, time_current_job, date_of_birth,
social_security, marital_status, heard_how, friend, credit_auth)
VALUES('$firstname', '$lastname', '$address1',
'$address2', '$city', '$state', '$zipcode',
'$email', '$how_long', '$day_phone', '$night_phone', '$best_time_call'
'$monthly_income', '$time_current_job', '$date_of_birth'
'$social_security', '$marital_status', '$heard_how', '$friend', '$credit_auth');";
And this is the error the I receive...
Warning: PostgresSQL query failed: ERROR: Bad date external representation 'Single' in /home/sbehnke/public_html/speedy/insert_user.php on line 56
This makes NO sense to me whatsoever. Any help would be greatly appreciate.
-Steven