Current location: Hot Scripts Forums » General Community » New Members & Introductions » PHP Script Web to Email Blank


PHP Script Web to Email Blank

Reply
  #1 (permalink)  
Old 10-26-09, 04:39 PM
Alle39 Alle39 is offline
New Member
 
Join Date: Oct 2009
Posts: 0
Thanks: 0
Thanked 0 Times in 0 Posts
PHP Script Web to Email Blank

Hi there I hope this complies with all the rules I tried to make sure it did.

PHP Code:

 <html>

<head>
<title>Landlord</title>
</head>

<body>

<?PHP

$to 
"info@atkinsonandanderson.co.uk";
$subject  "New property available to Rent";

$msg .= "Please add this person to the mailing list\n\n";
$msg .= "Landlord Name: "     $_POST['name'] . "\n\n";
$msg .= "Email: "     $_POST['txtemail'] . "\n\n";
$msg .= "Home Telephone Number: "     $_POST ["txtHomeNo"] . "\n\n";
$msg .= "Day Telephone Number: "     $HTTP_POST_VARS["txtDayNo"] . "\n\n";
$msg .= "Mobile Telephone Number: "     $HTTP_POST_VARS["txtMobNo"] . "\n\n";
$msg .= "Fax Number: "     $HTTP_POST_VARS["txtFaxNo"] . "\n\n";
$msg .= "Area: "     $HTTP_POST_VARS["txtArea"] . "\n\n";
$msg .= "Number Of Bedrooms: "     $HTTP_POST_VARS["txtBedrooms"] . "\n\n";
$msg .= "Property Type: "     $HTTP_POST_VARS["txtPropertyType"] . "\n\n";
$msg .= "Furnished: "     $HTTP_POST_VARS["txtFurnished"] . "\n\n";

$myname "Atkinson And Anderson Mail Form";
$mymail "info@atkinsonandanderson.co.uk";
$headers "Content-Type: text/plain; charset=us-ascii\n From: $myname <$mymail>\nReply-To: <$mymail>\n Return-Path: <$mymail>\nX-Mailer: PHP";

mail($to$subject$msg$headers);
?>
</body>
</html>
my name is ella and I would really appreciate any help I have noticed a few mistakes on our website and I have read loads! I still cant seem to correct the errors so thought I would ask here I have a little computor knowledge ( well a fair bit but probaly a little bit compared to you guys!) thing is I do love to learn and am enjoying the challenge but I am now becoming a little fustrated!!!this is one of many errors but I thought start with this one first!!

So the site has 2 forms a landlord and tenants one the code above is for the landlord one (thought if I got the solution to that the tenants one I could do myself so would not need to post that code also as it is basically the same bar for a couple of word changes) anyhow…

What am I missing in that code? The emails I get are blank I have tried $ POST["txtBedrooms"] . "\n\n"; but it makes no difference unless I misunderstood about post_vars and post.

This is the email details
Code:
 Return-Path: <info@atkinsonandanderson.co.uk> Delivered-To: info@atkinsonandanderson.co.uk Received: from Postfix filter 42a77884ce2a0a03efc6bb50a6dcdb21 (smtp-in-129 [127.0.0.1]) 	by smtp-in-129.livemail.co.uk (Postfix) with SMTP id 06DE061B730 	for <info@atkinsonandanderson.co.uk>; Thu, 22 Oct 2009 18:41:21 +0100 (BST) Received: from cust-smtp-192.fasthosts.net.uk (smtp-out-50.livemail.co.uk [213.171.216.50]) 	by smtp-in-129.livemail.co.uk (Postfix) with ESMTP id D8BF161B749 	for <info@atkinsonandanderson.co.uk>; Thu, 22 Oct 2009 18:41:20 +0100 (BST) Received: from iis620 (server213-171-218-20.livedns.org.uk [213.171.218.20]) 	by cust-smtp-192.fasthosts.net.uk (Postfix) with SMTP id B87D97700AD 	for <info@atkinsonandanderson.co.uk>; Thu, 22 Oct 2009 18:41:20 +0100 (BST) Date: Thu, 22 Oct 2009 18:41:20 +0100 Subject: Tennant enquiry To: info@atkinsonandanderson.co.uk Content-Type: text/plain; charset=us-ascii From: Atkinson And Anderson Mail Form <info@atkinsonandanderson.co.uk> Reply-To: <info@atkinsonandanderson.co.uk> X-Mailer: PHP Message-Id: <20091022174120.B87D97700AD@cust-smtp-192.fasthosts.net.uk> X-Original-To: info@atkinsonandanderson.co.uk  Please add this person to the mailing list  Name:   Email:   Home Telephone Number:   Day Telephone Number:   Mobile Telephone Number:   Fax Number:   Area:   Number Of Bedrooms:   Property Type:   Furnished:
Am so lost!!!
Please any advise will be great thanks ella
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 10-26-09, 05:01 PM
Alle39 Alle39 is offline
New Member
 
Join Date: Oct 2009
Posts: 0
Thanks: 0
Thanked 0 Times in 0 Posts
sorry

sorry that code was wrong (fell asleep half way through reverting back to vars lol)
thisis the right (original) code:

[php] <html>
<head>
<title>Landlord</title>
</head>

<body>

<?PHP

$to = "info@atkinsonandanderson.co.uk";
$subject = "New property available to Rent";

$msg .= "Please add this person to the mailing list\n\n";
$msg .= "Landlord Name: " . $HTTP_POST_VARS["name"] . "\n\n";
$msg .= "Email: " . $HTTP_POST_VARS["txtemail"] . "\n\n";
$msg .= "Home Telephone Number: " . $HTTP_POST_VARS["txtHomeNo"] . "\n\n";
$msg .= "Day Telephone Number: " . $HTTP_POST_VARS["txtDayNo"] . "\n\n";
$msg .= "Mobile Telephone Number: " . $HTTP_POST_VARS["txtMobNo"] . "\n\n";
$msg .= "Fax Number: " . $HTTP_POST_VARS["txtFaxNo"] . "\n\n";
$msg .= "Area: " . $HTTP_POST_VARS["txtArea"] . "\n\n";
$msg .= "Number Of Bedrooms: " . $HTTP_POST_VARS["txtBedrooms"] . "\n\n";
$msg .= "Property Type: " . $HTTP_POST_VARS["txtPropertyType"] . "\n\n";
$msg .= "Furnished: " . $HTTP_POST_VARS["txtFurnished"] . "\n\n";

$myname = "Atkinson And Anderson Mail Form";
$mymail = "info@atkinsonandanderson.co.uk";
$headers = "Content-Type: text/plain; charset=us-ascii\n From: $myname <$mymail>\nReply-To: <$mymail>\n Return-Path: <$mymail>\nX-Mailer: PHP";

mail($to, $subject, $msg, $headers);
?>
</body>
</html> [\php]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
WEB HOSTING - $4.99/MONTH For 1GB HD & 25GB BW! CPanel, PHP, MySQL & MORE! IncognitoNet General Advertisements 0 07-21-05 02:20 PM
PHP script problem (please help) osmanmumtaz PHP 0 05-24-05 08:29 AM
RESELLER WEB HOSTING - $9.99/MONTH For 4GB HD & 30GB BW! CPanel, PHP, MySQL & MORE! IncognitoNet General Advertisements 2 11-12-04 04:25 PM
web proxy script id10tn00b Script Requests 1 10-09-04 07:02 PM
accessing existing ISP email with a PHP webmail script. nlancaster PHP 1 01-07-04 04:28 AM


All times are GMT -5. The time now is 10:53 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.