Jump to content

PHP form submiting on viewing page


blink359

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.