Web Design Forum  
 
Go Back   Web Design Forum > Web Software > Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 12-08-2009, 03:50 PM   #1
New Member
 
Join Date: Apr 2007
Posts: 5
Default php email problem

Hi Guys,

i have a html form which sumbits data to a file.. submit_mail.php

recently the email im receiving from the php file has been blank? nothing except telling me a subject and who the email is from

the code in the php file is:



PHP Code:
<?php 

$type 
$_REQUEST["type"]; 
$fname $_REQUEST["fname"]; 
$lname $_REQUEST["lname"]; 
$address $_REQUEST["address"]; 
$phone $_REQUEST["phone"]; 
$bmail $_REQUEST["bmail"]; 
$adults $_REQUEST["adults"]; 
$under18 $_REQUEST["under18"]; 
$query $_REQUEST["query"]; 
$date $_REQUEST["date"]; 
$month $_REQUEST["month"]; 
$year $_REQUEST["year"]; 
$duration $_REQUEST["duration"]; 

  
mail"example@example.com""General Enquiry"
    
$message"From: $bmail" ); 
  
header"Location: http://www.domainexample.co.uk/thankyou.html" ); 
?>

any ideas as to why i am receiving blank emails?

im sure i have had emails previously with this code but could be wrong??

thanks for looking
VanHype is offline   Reply With Quote


Old 12-11-2009, 03:22 PM   #2
EET
New Member
 
EET's Avatar
 
Join Date: Dec 2009
Location: Helsinki, Finland (Europe)
Posts: 4
Default

You are not sending the information of the form anywhere in the code. You are just sending the title = "General Enquiry" and $message (which is?). If you want to send those informations above like $type etc. you have to specify them in the code.
EET is offline   Reply With Quote
Old 12-13-2009, 12:12 AM   #3
New Member
 
Join Date: Apr 2007
Posts: 5
Default Thankyou all for your comments

hi guys, thanks very much for your help - im useless with php and it has taught me a few things solving the problem with the help or all of your comments...

the email is successfully working now:

PHP Code:
<?php

$type 
$_REQUEST["type"];
$fname $_REQUEST["fname"];
$lname $_REQUEST["lname"];
$address $_REQUEST["address"];
$phone $_REQUEST["phone"];
$bmail $_REQUEST["bmail"];
$adults $_REQUEST["adults"];
$under18 $_REQUEST["under18"];
$query $_REQUEST["query"];
$date $_REQUEST["date"];
$month $_REQUEST["month"];
$year $_REQUEST["year"];
$duration $_REQUEST["duration"];

  
mail"example@example.co.uk""General Enquiry",
    
$message "$fname $lname has sent you a $type.\n\n
    - Contact Details -\n
    Name: $fname $lname\n
    Address: $address\n
    Contact Number: $phone\n
    Email Address: $bmail.\n\n
    - Booking Enquiry -\n
    Adults: $adults - Under 18s: $under18 - Dates Required: $date / $month / $year - Duration: $duration nights.\n\n
    - Comments/Questions -\n
    $query"
"From: $bmail" );
  
header"Location: http://www.example.co.uk/thankyou.html" );
?>
VanHype is offline   Reply With Quote
Reply

Tags
email, form, php, submit

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 02:03 PM.


Camera Forum - Computer Forum - Web Design Forum

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.