SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: line break

  1. #1
    SitePoint Addict
    Join Date
    Oct 2010
    Posts
    323
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    line break

    please the line breaks not working in the email sent

    PHP Code:
    $pplresult mysql_query("SELECT * FROM repplac"); 
    $list $row['Sname'] .$row['Pname'] .$row['Psize'] .$row['Pcolour'] .$row['Pquantity'] .$row['Price'];
    while(
    $row mysql_fetch_assoc($pplresult)){
    $list .= $row['Sname'] .$row['Pname'] .$row['Psize'] .$row['Pcolour'] .$row['Pquantity'] .$row['Price'] ."<br/>";}
     
    //echo $list; }
     //die();
     
    // sending email
     
    $to $email;
           
    $subject "YOUR ORDER LIST FROM RE";
           
    $headers "From: donotreply@re.co.uk";
           
    $body "$list";
           
    //send emil
           
    mail($to,$subject,$body,$headers);
    $transfer mysql_query("INSERT INTO wishlist SELECT  * FROM repplac")or die(mysql_error());
    $deletetable mysql_query("DELETE FROM repplac")or die(mysql_error());
    redirect_to('youraccount.php'); 

  2. #2
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    for an email keep it simple

    not "<br />" but concat a newline char "\n" <- nb in double quotes

  3. #3
    SitePoint Addict
    Join Date
    Oct 2010
    Posts
    323
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •