Hello,
I was hoping someone could help me with my PHP script I have listed
below. It seems to go through the entire script and navigates to the
/messagesent.htm page, however, no records are being inserted in the
database.... what gives? Please check out the script below and let me
know your thoughts. Thanks for your assistance!
Thanks,
Josh
----------------------------------------------------SCRIPT
BELOW-----------------------------------------------------------------------
<?php
$name = $_POST['NAME'];
$title = $_POST['TITLE'];
$company = $_POST['COMPANY'];
$address = $_POST['ADDRESS'];
$city = $_POST['CITY'];
$zip = $_POST['ZIP'];
$phone = $_POST['PHONE'];
$fax = $_POST['FAX'];
$email = $_POST['EMAIL'];
$quote = $_POST['QUOTE'];
$mod1 = $_POST['MOD1'];
$mod2 = $_POST['MOD2'];
$mod3 = $_POST['MOD3'];
$mod4 = $_POST['MOD4'];
$mod5 = $_POST['MOD5'];
$mod6 = $_POST['MOD6'];
$mod7 = $_POST['MOD7'];
$mod8 = $_POST['MOD8'];
$mod9 = $_POST['MOD9'];
$mod10 = $_POST['MOD10'];
$mod11 = $_POST['MOD11'];
$mod12 = $_POST['MOD12'];
$workstations = $_POST['WORKSTATIONS'];
$forms = $_POST['FORMS'];
$submit = $_POST['SUBMIT'];
$con = pg_connect("host=127.0.0.1 port=5432 dbname=dbone user=joshua
password=jnw08jnw") or
die("Couldn't Connect ".pg_last_error());
pg_query("INSERT INTO demorequest (name, title, company, address,
city, state, zip, phone, fax, email, quote, mod_guestprospecting,
mod_fni, mod_lease, mod_parts, mod_service, mod_payroll, mod_vehinvmgt,
mod_accounting, mod_appraisal_control, mod_autocreditbureau,
mod_leaserresidual, mod_creditbureau, workstations, forms)
VALUES ('$name', '$title', '$email', '$phone', '$fax', '$email',
'$quote', '$mod1', '$mod2', '$mod3', '$mod4', '$mod5', '$mod6', '$mod7',
'$mod8', '$mod9', '$mod10', '$mod11', '$mod12', '$workstations',
'$forms')");
pg_close($con);
header("Location: http://www.mywebsite.com/messagesent.htm");
exit;
?>