
March 14th, 2003, 08:52 AM
|
|
Contributing User
|
|
Join Date: Dec 2002
Location: Knoxville, Tennessee (U.S.A.)
Posts: 58
Time spent in forums: 5 m 15 sec
Reputation Power: 6
|
|
|
How Do I Get PHP To Reject HTML Code From Text Entry Boxes?
How Do I Get PHP To Reject HTML Code From Text Entry Boxes?
Folks;
I am designing a portion of a web site where non-technical users can enter text for news articles. The text will be stored in a MySQL database. I am wanting to place restrictions in the PHP code so that users cannot enter HTML tags into the article text.
Obviously, if users were able to enter HTML tags in the article when the article is extracted from the database and presented on the page any stray HTML tags could mess up the page.
I'm sure that there are different methods that could achieve the same goal but I would like to have suggestions or different points of view.
My question is this: **Does anyone have any suggestions about how I might approach writing or designing the PHP code so that HTML tags will be removed from text before the text is stored in the MySQL database?**
Any opinions or information would be appreciated. Thank you kindly in advance.
Volitics
|