Hey All,
I have a Flash form that when submitted, the data goes to my email address. That’s working fine, however, I’m trying to send the data to my database as well. It appears that I’m missing something, here is what I have so far:
<?php
require_once('Connections/con_jcol.php');
$destinationAdress="my_email@domain.com";
$nowDay = date("m.d.Y");
$nowTime = date("H:i:s");
$fullName = $_POST['fullName'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$message = $_POST['message'];
$FormContent = "Message date = $nowDay at $nowTime
----------------------------------------------------------------------------
From: $fullName
Phone Number: $phone
Primary Email Address: $email
----------------------------------------------------------------------------
Question: $message";
mail($destinationAdress, "$subject [ My Domain Form Submission from $fullName ]", $FormContent, "From: $email");
if (!$conn_jcol)
{
die('Could not connect: ' . mysql_error());
}
mysql_pconnect("my_db", $conn_jcol);
mysql_query("INSERT INTO tbl_contacts (name, email, phone, message, date)
VALUES ($fullName, $phone, $email, $message, $nowDay)");
mysql_close($conn_jcol);
?>
Can someone please tell me what I’m doing wrong. I’ve been working on this for the past 3 hours