Jump to content

tobyhutton

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

tobyhutton's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Sorry but how would I write this. Would this do the trick <?php echo nl2br(". $_POST['message']); ?> Thanks
  2. Hi there, I'm not really a php person more asp. I have to write an html send mail script. The email sends and receives perfect. When a user writes the message in the <textarea> box I need to be able to write a new line, so when they press enter and blank line will show in the textarea, how can I write <br> for every blank line. Heres my code so far..... <?php $from = $_POST['email']; $to = "[email][email protected][/email]"; $subject = $_POST["subject"]; $name = $_POST['name']; $location = $_POST['location']; $message = $_POST['message']; $HTML = "<font size=2 face=arial><b><u>" . $name ." from " . $location . "</font></u></b>"; $HTML = $message sendHTMLemail($HTML,$from,$to,$subject); function sendHTMLemail($HTML,$from,$to,$subject) { $headers = "From: $from\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $boundary = uniqid("HTMLEMAIL"); $headers .= "Content-Type: multipart/alternative;". "boundary = $boundary\r\n\r\n"; $headers .= "This is a MIME encoded message.\r\n\r\n"; $headers .= "--$boundary\r\n". "Content-Type: text/plain; charset=ISO-8859-1\r\n". "Content-Transfer-Encoding: base64\r\n\r\n"; $headers .= chunk_split(base64_encode(strip_tags($HTML))); $headers .= "--$boundary\r\n". "Content-Type: text/html; charset=ISO-8859-1\r\n". "Content-Transfer-Encoding: base64\r\n\r\n"; $headers .= chunk_split(base64_encode($HTML)); mail($to,$subject,"-f",$headers); } ?> The $message is the message the user writes. Any Thoughts Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.