Thanks to you guys, i now understand much better this whole thing, but i now have a problem where, after submit, i get the mysql error, "Column count doesn't match value count at row 1"
my form code is
<?php
// MySQL connection variables
$host="server";
$username="Vetsform";
$password="saerverpassxduhsjdkasjdlcc";
$db_name="Vetsform";
$tbl_name="vetform1";
// Connect to server and select database.
mysql_connect("$host", "$username", "$password") or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
//Save data from the HTTP POST values submitted from the PDF
extract($_REQUEST);
// Insert all the data from above into the table in the database
$sql="INSERT INTO $tbl_name(Vet_First , Vet_Middle,
Vet_Email,
Vet_AreaCode,
Vet_PhonePrefix,
Vet_PhoneSuffix,
Vet_StreetAddress,
Vet_City,
Vet_Zip,
State,
Army,
Navy,
Airforce,
Nursing,
Other,
DateEnlisted,
Datedischarged,
Emg_Name_first,
Emg_Name_mi,
Emg_Name_Last,
Emg_Email,
Emg_Phone_Area,
Emg_Phone_Prefix,
Emg_Phone_Suffix,
Emg_Address,
Emg_City,
Emg_Zip,
Emg_State)
VALUES
('$Vet_First',
'$Vet_Middle:',
'$Vet_Email',
'$Vet_AreaCode',
'$Vet_PhonePrefix',
'$Vet_PhoneSuffix',
'$Vet_StreetAddress',
'$Vet_City',
'$Vet_Zip',
'$State'
'$Army',
'$Navy',
'$Airforce',
'$Nursing',
'$Other',
'$DateEnlisted',
'$Datedischarged',
'$Emg_Name_first',
'$Emg_Name_mi',
'$Emg_Name_Last',
'$Emg_Email',
'$Emg_Phone_Area',
'$Emg_Phone_Prefix',
'$Emg_Phone_Suffix',
'$Emg_Address',
'$Emg_City',
'$Emg_Zip',
'$Emg_State')";
$result=mysql_query($sql) or die(mysql_error());
// If it worked, say so...
// This will change later on so it won't have the like to view all users, obviously...that's just for testing purposes
if($result){
echo "Successful";
}
else {
echo "ERROR";
}
mail( "Crzycm16@verizon.net","Validate","hi","From: Validate@shsforms.com");
// Close connection to the database
mysql_close();
?>
hopefully you guys can see it, cuz i cant/ im pretty new at this.