Current location: Hot Scripts Forums » Programming Languages » PHP » PHP Mail scripts problems


PHP Mail scripts problems

Reply
  #1 (permalink)  
Old 07-08-06, 09:04 AM
phpmekiwi phpmekiwi is offline
Newbie Coder
 
Join Date: Jul 2006
Location: Melbourne
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
PHP Mail scripts problems

Hey,

can someone help me, whats wrong with this?

PHP Code:

<?php 

if($action=="mail") {
$headers "From: $from <$from>\r\n";
        
$headers .= "Reply-To: $from\r\n";
        
$Subject "$subject";
        
$To "ben@neoxdesigns.com \r\n";
        
$Body $body "
        
        
mail("$to$subject$body$headers");
    
        
        
?>
Thanks.
Reply With Quote
  #2 (permalink)  
Old 07-08-06, 09:09 AM
mab's Avatar
mab mab is offline
Community VIP
 
Join Date: Oct 2005
Location: Denver, Co. USA
Posts: 2,674
Thanks: 0
Thanked 0 Times in 0 Posts
The parameters for the mail(...) function are individual strings -
PHP Code:

mail("$to$subject$body$headers"); // not correct


mail($to$subject$body$headers); // correct 
__________________
Error checking, error reporting, and error recovery. If your code does not have these to get it to tell you why it is not working, what makes you think someone in a programming forum will be able to tell you why it is not working???
Reply With Quote
  #3 (permalink)  
Old 07-08-06, 09:16 AM
phpmekiwi phpmekiwi is offline
Newbie Coder
 
Join Date: Jul 2006
Location: Melbourne
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by mab
The parameters for the mail(...) function are individual strings -
PHP Code:

mail("$to$subject$body$headers"); // not correct


mail($to$subject$body$headers); // correct 
It still says:

Parse error: syntax error, unexpected T_STRING in /home/flykiwic/public_html/neoxdesigns/submit_form.php on line 32

PHP Code:

mail($to$subject$body$headers); // This is line 32 

Reply With Quote
  #4 (permalink)  
Old 07-08-06, 09:44 AM
duesi's Avatar
duesi duesi is offline
Wannabe Coder
 
Join Date: Jun 2006
Posts: 225
Thanks: 0
Thanked 0 Times in 0 Posts
What is in the line(s) above line 32?
The PHP Parser is often not able to determine the location of an error correctly.
__________________
Duesi

"One of the great skills in using any language is knowing what not to use, what not to say" (Ron Jeffries)

http://www.swissbytes.de
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
2 profitable script sites for sale cms-master.com General Advertisements 3 07-03-07 10:17 AM
PHP mail function and sending php content. strings6 PHP 4 12-27-05 08:03 AM
PHP multi-dimensional array sorting issue aqw PHP 2 06-24-05 11:09 PM
having problems with php scripts MeDieViL PHP 4 09-11-04 09:39 AM


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