Hello I have yet another delima i need to figure out why the email is sending but the values are not showing up in the data base.
this is my table structure
CREATE TABLE IF NOT EXISTS fname (
fname text NOT NULL,
lname text NOT NULL,
email text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
and this is the script
<?php
// Receiving variables
$loanamt = addslashes($GET['loanamt']);
$fname = addslashes($GET['fname']);
$lname = addslashes($GET['lname']);
$email = addslashes($GET['email']);
$province = addslashes($GET['province']);
$postal = addslashes($GET['postal']);
$con = mysql_connect("localhost","test","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("zanzu_test", $con);
$sql="INSERT INTO fname (fname,lname,email)
VALUES
('$POST[fname]','$POST[lname]','$_POST[email]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
mysql_close($con);
$header = "From: $email\n"
. "Reply-To: $email\n";
$subject = "CashLoans.ca | Payday Loan Request";
$email_to = "dan@enviomedia.com";
$message = "loanamt: $loanamt\n"
. "fname: $fname\n"
. "lname: $lname\n"
. "email: $email\n"
. "province: $province\n"
. "postal: $postal\n";
mail($email_to, $subject ,$message ,$header ) ;
header("Location: http://www.autocarloans.ca/apply-online.html");
?>