FireFox! The PHP Forum Loans and Credit
Panama Web Design for Hire Free Insurance Quotes!
Web Hosting Advertise Here $10 a Month Designer Children
Never Pay Taxes Again HGH Domain name registration
Web Hosting and Dedicated Servers Insurance Affordable web-hosting


HomeWatched TopicsRegisterSearchDirectory
FAQMemberlistUsergroupsLog inStoresItemsBank
Google

Reply to topic Page 1 of 1
PHP mail function
Message  

Reply with quote
Post PHP mail function 
Hi there,

I am a new in PHP & getting a few issues with the mail function.

I would like to add 2 or more fields onto the $mailcontent,and be able to add a break to create a new line.

Here is my code:

$name = $_REQUEST['name'];    
    $email = $_REQUEST['email'];
    $option =$_REQUEST['option'];
    $message = $_REQUEST['message'];    
    $has_sumbit = false;
        
    $to = 'me@me.com';    
    $subject = $option;
    $mailcontent ='Name: '.$name.$message;    
    
    $from = 'From:' .$email;

I would like to add a <br /> between the $name& $message in the $mailcontent.

Thanks for your help

Fred

View user's profile Send private message AIM Address

Reply with quote
Post use this code 
use this...


    $mailcontent ='Name: '.$name.'\n'.$message;    
    
    $from = 'From:' .$email;

use '\n' instead of <br>
where ever u want a new line.


_________________
Anil Sharda
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

Reply with quote
Post  
Thanks for the code Anil,

You pointed me in the right direction.
Just let you know that using the single quote doesn't parse as a new line.
I had to double parse"" to get it.

Thanks

Fred

View user's profile Send private message AIM Address
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  



Google

FireFox! The PHP Forum Loans and Credit
Panama Web Design for Hire Free Insurance Quotes!
Web Hosting Advertise Here $10 a Month Designer Children
Never Pay Taxes Again HGH Domain name registration
Web Hosting and Dedicated Servers Insurance Affordable web-hosting


Web Design by PlatinumShore.com & Web Hosting by TradeWebHosting.com