#native_company# #native_desc#
#native_cta#

Using HTML in forms fields

By Nadia Lakatos
on 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:

htmlspecialchars()

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