Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I am using the following process script for a form to e-mail page. Everything is fine, but when the message is sent to my e-mail address, the senders e-mail address shows 'From: thesender@the_path_to_my_server'. Does anyone know how I can convert it so that it is actually sent from the senders e-mail address.
Thanks,
Des.Code: Select all
<?php
$errors=0;
if($Name=="" || $Age=="" || $Gender=="" || $Location=="" || $Interests=="" || $Bands=="" || $Gig=="" || $Discs=="" || $Books=="" || $Films=="" || $Email=="" || $Show=="" ){
header ("location: error.php");
exit;
}
if(!is_uploaded_file($Photo)){
header ("location: photo_error.php");
exit;
}
if($errors==1) echo $error;
else{
$image_part = date("h_i_s")."_".$Photo_name;
$image_list[14] = $image_part;
copy($Photo, "files/".$image_part);
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="Name: ".$Name."
Age: ".$Age."
Gender: ".$Gender."
Location: ".$Location."
Interests: ".$Interests."
Bands: ".$Bands."
Gig: ".$Gig."
Discs: ".$Discs."
Books: ".$Books."
Films: ".$Films."
Email: ".$Email."
Show: ".$Show."
Msn: ".$Msn."
Website: ".$Website."
Photo: ".$where_form_is."files/".$image_list[14]."
";
mail("me@mysite.com","Message Title",$message,"From: Sender");
header("Refresh: 0;url=http://mysite.com/folder/profile_sent.php ");
}
?>feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]