php==> goin to the next line (text area)?
echo "<textarea rows='21' name='body' cols='73'>";
while ($row = mysql_fetch_array($data))
echo $row['msg']. "<br>";
echo"</textarea>";
i am using <br> so it suppose to go to the next line in my text are but
instead of going to the next line it just prints <br> anybody knows y?
Answers:
<br> is html code, the text area as far as i know understands <br> as ordinary text.
The php processor however does understand "\n" as I must goto the next line . I am no expert(in fact I just started learning php a few months ago ) but I used your code for one of my databases and just changed the "<br>" to "\n" and it worked.
You can also use "\r", "\r" tells php to insert a carriage return,
which is similar to new line. I am not 100% sure that \r and \n are the same thing, but both will work for your script.
Other answers:
Replace "<BR>" with "\n".