Ok, so I am trying to take the variables from a HTML form and put them into the database, The php seems to work because I get no errors but it does not post the variables into the database. Can someone help me out with this.
Here is my code:
<html>
<head>
</head>
<body>
<?php
// set up some variables
// server name
$server = "localhost";
// username
$user = "vminter_admin";
// password
$pass = "12041980";
// database to query
$db = "vminter_cars";
// open a connection to the database
$connection = mysql_connect($server, $user, $pass);
// formulate the SQL query - same as above
$query = "INSERT INTO credit
(date,
myear,
make,
model,
newused,
mileage,
contact,
csp,
dpayment,
ntrade,
famount,
term,
aname,
ssn,
dob,
caddress,
city,
state,
zip,
yaddress,
hphone,
opro,
lmholder,
mra,
paddress,
pcity,
pstate,
pzip,
ypaddress,
naemployer,
ser,
aincome,
taj,
bphone,
position,
oincome,
soi,
csbn,
ba,
an,
bcsbn,
ban,
cdpn,
lafb,
balance,
ti,
creditcard,
ccother,
narnlwy,
rphone,
naf,
fphone,
nacr,
ra,
coaname,
cossn,
codob,
cocaddress,
cosity,
costate,
cosup,
coyaddress,
cohphone,
coopro,
colmholder,
comra,
copaddress,
copcity,
copstate,
copzip,
coypaddress,
conaemployer,
coser,
coaincome,
cotaj,
coposition,
cooincome,
cosoi)
VALUES
('$date',
'$myear',
'$make',
'$model',
'$newused',
'$mileage',
'$contact',
'$csp',
'$dpayment',
'$ntrade',
'$famount',
'$term',
'$aname',
'$ssn',
'$dob',
'$caddress',
'$city',
'$state',
'$zip',
'$yaddress',
'$hphone',
'$opro',
'$lmholder',
'$mra',
'$paddress',
'$pcity',
'$pstate',
'$pzip',
'$ypaddress',
'$naemployer',
'$ser',
'$aincome',
'$taj',
'$bphone',
'$position',
'$oincome',
'$soi',
'$csbn',
'$ba',
'$an',
'$bcsbn',
'$ban',
'$cdpn',
'$lafb',
'$balance',
'$ti',
'$creditcard',
'$ccother',
'$narnlwy',
'$rphone',
'$naf',
'$fphone',
'$nacr',
'$ra',
'$coaname',
'$cossn',
'$codob',
'$cocaddress',
'$cosity',
'$costate',
'$cosup',
'$coyaddress',
'$cohphone',
'$coopro',
'$colmholder',
'$comra',
'$copaddress',
'$copcity',
'$copstate',
'$copzip',
'$coypaddress',
'$conaemployer',
'$coser',
'$coaincome',
'$cotaj',
'$coposition',
'$cooincome',
'$cosoi')";
// run the query on the database
$result = mysql_db_query($db,$query,$connection);
?>
</body>
</html>