I have a form that sends the information into a db and also sends an email...a friend of mine did this and it worked when an actual@name.com address is in there. bUt not like this $email. Any ideas?
============
$the_name= $HTTP_POST_VARS ["the_name"];
$email= $HTTP_POST_VARS ["email"];
$sex= $HTTP_POST_VARS ["sex"];
$age= $HTTP_POST_VARS ["age"];
$job_level= $HTTP_POST_VARS ["job_level"];
$education= $HTTP_POST_VARS ["education"];
$divisions= $HTTP_POST_VARS ["divisions"];
$ethnicity= $HTTP_POST_VARS ["ethnicity"];
mysql_select_db("rethought");
$query="insert into tara_survey(name,email,age,sex,job_level,education,divisions,ethnicity) values ('$the_name','$email',$age,$sex,$job_level,$education,$divisions,$ethnicity)";
//echo $query;
mysql_query($query, $db);
$query = "select code from codes where id =". mysql_insert_id();
$result = mysql_query($query,$db);
$row = mysql_fetch_object($result);
mysql_free_result($result);
$body="Thank you, the links to your surveys are below.
============
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: me@earthlink.net\r\n";
//echo $body;
//$result = mail("me@here.com", "Survey Link Request",$body, $headers);
$result = mail( $email, "Survey Link Request",$body, $headers);
//echo "The mail " .$result;
=========
============
$the_name= $HTTP_POST_VARS ["the_name"];
$email= $HTTP_POST_VARS ["email"];
$sex= $HTTP_POST_VARS ["sex"];
$age= $HTTP_POST_VARS ["age"];
$job_level= $HTTP_POST_VARS ["job_level"];
$education= $HTTP_POST_VARS ["education"];
$divisions= $HTTP_POST_VARS ["divisions"];
$ethnicity= $HTTP_POST_VARS ["ethnicity"];
mysql_select_db("rethought");
$query="insert into tara_survey(name,email,age,sex,job_level,education,divisions,ethnicity) values ('$the_name','$email',$age,$sex,$job_level,$education,$divisions,$ethnicity)";
//echo $query;
mysql_query($query, $db);
$query = "select code from codes where id =". mysql_insert_id();
$result = mysql_query($query,$db);
$row = mysql_fetch_object($result);
mysql_free_result($result);
$body="Thank you, the links to your surveys are below.
============
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: me@earthlink.net\r\n";
//echo $body;
//$result = mail("me@here.com", "Survey Link Request",$body, $headers);
$result = mail( $email, "Survey Link Request",$body, $headers);
//echo "The mail " .$result;
=========