blink359 Posted April 4, 2010 Share Posted April 4, 2010 Hi i made this form to email me the information that the person fills into the form, its doing that fine but whenever someone views the page it emails me a blank version can someone help me correct the php and tell me what is wrong thanks <?php // Receiving variables @$pfw_ip= $_SERVER['REMOTE_ADDR']; @$name = addslashes($_GET['name']); @$address = addslashes($_GET['address']); @$county = addslashes($_GET['county']); @$postcode = addslashes($_GET['postcode']); @$phone = addslashes($_GET['phone']); @$email = addslashes($_GET['email']); @$size = addslashes($_GET['size']); @$image_Name = $_FILES['image']['name']; @$image_Size = $_FILES['image']['size']; @$image_Temp = $_FILES['image']['tmp_name']; @$image_Mime_Type = $_FILES['image']['type']; // Validation //Sending Email to form owner $pfw_header = "From: $name\n" . "Reply-To: $name\n"; $pfw_subject = "Order"; $pfw_email_to = "[email protected]"; $pfw_message = "Visitor's IP: $pfw_ip\n" . "name: $name\n" . "address: $address\n" . "county: $county\n" . "postcode: $postcode\n" . "phone: $phone\n" . "email: $email\n" . "size: $size\n" @mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ; ?> Thanks, Blink359 Link to comment https://forums.phpfreaks.com/topic/197564-php-form-submiting-on-viewing-page/ Share on other sites More sharing options...
Pikachu2000 Posted April 4, 2010 Share Posted April 4, 2010 Is this script being included in thew script that has the form in it? There is no conditional to see if the mail should actually be sent or not. Link to comment https://forums.phpfreaks.com/topic/197564-php-form-submiting-on-viewing-page/#findComment-1036866 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.