I understand you use the mail() to send an email using php, but I need to send an email in a different way. I have a survey that people need to complete, and after they submit the survey an email needs to be sent to them, so each time there will be a new email. Any advice on how I can do this? Below you will see my code:[br]
[code=php]<?php
$con = mysql_connect(“server”,”user”,”pass”);
if (!$con)
{
die(‘Could not connect: ‘ . mysql_error());
}
mysql_select_db(“my_db”, $con);
$sql=”INSERT INTO Questions (Name, Email, Age, Sex, Income, Edu, Children, Apparel)
VALUES
(‘$_POST[name]’,’$_POST[email]’,’$_POST[age]’,’$_POST[sex]’,’$_POST[income]’,’$_POST[edu]’,’$_POST[children]’,’$_POST[apparel]’)”;
if (!mysql_query($sql,$con))
{
die(‘Error: ‘ . mysql_error());
}
echo “Your information has been submitted. Thank you for your time. An email will be sent to the one provided shortly.”;
mysql_close($con)
?>