Forum Moderators: coopster
$key = mysql_insert_id();
$query = "SELECT * FROM userdeats WHERE idnum='$key'"; /* Execute the query */
$result = mysql_query($query);
/* get an array of the table results */
$values = mysql_fetch_array($result);
$req_email = $values['req_email'];
$new_user = $values['new_user'];
$new_pass = $values['new_pass'];
$new_email = $values['new_email'];
$mail_to= ".$req_email.";
$mail_subject= 'A requested user account has been created' ;
$mail_body= 'User account number ".$key." has been created. The detaisl are as followos: Username = ".$new_user." Password = "$.new_pass." E-mail address = "$.new_email."';
$headers= 'CC: itservices@example.tv';
$headers= 'From: itservices@example.tv';
mail($mail_to, $mail_subject, $mail_body, $headers);
and it returs the following error
mail() [function.mail]: SMTP server response: 501 5.5.4 Invalid Address
Can someone help me please, am a bit of a nubee
[edited by: jatar_k at 3:52 pm (utc) on Sep. 23, 2005]
[edit reason] examplified [/edit]
You mite also wana add a "." before you second $header value to concatinate it with the first. Although i dont think that caused the error.