How can you write the contents of a textarea exactly like it is (with carriage returns and all) in an html page?
for example the textarea has this in it:
line1line1 line2 line3line3
I DO NOT WANT THE HTML TO BE LIKE THIS: line1line1 line2 line3line3
The simple way:
<pre><?php echo htmlspecialchars($_POST['fieldname']); ?></pre>
Another option:
<p> <!-- or whatever other HTML markup element you want to use --> <?php echo nl2br(htmlspecialchars($_POST['fieldname'])); ?> </p>