Ok, so I am not sure how to complete this the way I would like it. Basically creating a PM system. Got it all working properly, but the thing that I want to figure out is.. Example: ----------- If I type a message here and hit return then return again See the spacing!? I am presuming that it has to be done before the insert of the db. The field is set to longtext in the database. So what would be the best way to accomplish this?
i think this is what you need <textarea name="textfield" cols="30" rows="6" id="textfield"></textarea> and when inserting it into the database try magic qouts and mysql_real_escape_string
When you pull the message from the database to display you can call nl2br(): <? $formatted_text = nl2br($message['text']); ?> Code (markup): http://uk2.php.net/manual/en/function.nl2br.php Or you can wrap the output in a pre html tag. <pre><?= $message_text; ?></pre> Code (markup): http://www.w3schools.com/TAGS/tag_pre.asp