Reply
Simple PHP mail syntax error
Old 11-21-2008, 02:18 PM Simple PHP mail syntax error
aigb_mcd's Avatar
Experienced Talker

Posts: 39
Trades: 0
can anyone help with this? I keep getting Parse error:syntax error, unexpected "'" in my line see code below. Do I have an extra anywhere?

Code:
 
// Email Stats
$from = "jane.doe@you.com";
$subject = "Bad Rating Report";
$headers = "MIME-Version: 1.0";
$message = "You have been given a bad rating for your location";
 
 
// My arrary for email address
$array=array(1=>'email@you.com',2=>"you@you.com",5=>"someboy@you.com");
 
 
// Mail based on dropdown selection and rating
if ($_POST['field_name'] < 5) {
mail($_POST['dallas_question'], "$subject", "$message", "$from" "$header");
}

Last edited by aigb_mcd; 11-21-2008 at 02:19 PM..
aigb_mcd is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 11-21-2008, 04:42 PM Re: Simple PHP mail syntax error
Experienced Talker

Posts: 32
Trades: 0
missing a comma after $from and i think you don't to wrap the variables in the mail function with double quotes
__________________
xhtmlme.com Professional PSD to XHTML coding services
tsiger is offline
Reply With Quote
View Public Profile
 
Old 11-30-2008, 12:00 AM Re: Simple PHP mail syntax error
Average Talker

Posts: 20
Trades: 0
If you're interested, I have an article on sending email in HTML form on my snippet site.

Check it out: http://www.snipiti.com/viewsnippet/index/60.
JeremyApp is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Simple PHP mail syntax error
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.11614 seconds with 13 queries