I have a text area for users to input text. That text is the inserted into a database and displayed on a page. How can I allow users to insert basic html into the submit form? Just wanting basic html like p, br, href
You could make different codes for people to use like [p] and [link=site.com]Click here[/url]. You could use the script to turn the tags into real html after using htmlspecialchars() to filer out any other unwanted HTML. For <br /> tags it'd be easier to use nl2br().
Actually, I am the only one that will be using this form. Well, myself and my partner. SO, I am not worried about what characters and such. Current, if I put in a <p></p>, that is exactly what is displayed on the generated page. How can I make it generate html out of the characters?
No problem. I came across the same problem yesterday since I'm coding and admin backend for one of my sites where I can add messages to a database.