Grateful if anyone could help.
I am using the following php to submit a form to a database but I also want to have the details of the same form emailed too. Just not sure how to go about it?
<?php
$con = mysql_connect("XXXXXX.xxx.XXXX", "XXXXXX", "XXXXX");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("xxxxxxxxx_xxx_xx", $con);
$sql="INSERT INTO database table (name, age, email, contact, Schoolorcollege, date, hear)
VALUES
('$_POST[name]', '$_POST[age]','$_POST[email]','$_POST[contact]','$_POST[schoolorcollege]','$_POST[date]','$_POST[hear]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "<meta http-equiv='Refresh' content='0; URL=http://www.xxxxxxxxxx.com/thankyou.php'>";
mysql_close($con)
?>