Adding <p></p> to a submitted text area
Posted on 2007-11-17
I'm currently making a guest book for a site I'm building at the moment but have hit a problem I can't seem to get past.
I have a text area where a visitor can type their message but when it's submitted and sent to the database it loses all its formatting. So basically all I need it to do is add <p></p> tags where appropriate. Is there a way to do this with php?
I want to keep things simple so don't want a full blown wysiwyg editor with stripped features.