Hi,
I have a question regarding the mail () function. I trying to add a e-mail form to my website to allow visitors to e-mail members without me having to display a visible e-mail address.
I'm using the following code. The first part (e-mail address) is retrieved from the member database, the second part is data (subject, message, and return address) posted in the form.
The script works however the return address is posted in the message area. Is there anything I can/ need to do to put it into the header?
Thanks.
$sql3 = "Select * From users where user_id='$user_id'";
$results = mysql_query ($sql3);
while ($retrieve=mysql_fetch_array ($results)){
$email= $retrieve ['email'];
$subject= "$subject";
$message = "$message";
$from="$from";
mail ("$email", $subject, $message, $from) or print "Could not send mail";
}