Monday, February 16, 2015

New Line from text Area


Use nl2br

 
$name = htmlspecialchars($_POST['name']);
$message = nl2br(htmlspecialchars($_POST['message'])); 
 
 //begin of HTML message
$message = <<<EOF


Name:</b><br>
{$name}


Message:</b><br>
{$message}
</body>
</html>
EOF;

No comments:

Post a Comment