PHPBuilder - Using HTML in forms fields

RSS Twitter

Using HTML in forms fields

by: Nadia Lakatos
September 11, 2001

After spending hours looking around for something enable me to use HTML tags in form fields I found the following:

ereg_replace() preg_replace()

After try each and not getting the results i was wanting, I kept looking and finally found this:


This allows you to show HTML coding in form fields, without messing up the input boxes. The syntax is used like this:

htmlspecialchars("$name", ENT_QUOTES)

I did find information about exactly how it works on the web, however I can't remember the site. Try searching for 'htmlspecialchars' and you may find out more.

I hope this helps others in need in similar code.

Regards, Nadia

Comment and Contribute

Your comment has been submitted and is pending approval.

Nadia Lakatos



(Maximum characters: 1200). You have characters left.