|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
html into a mySQL database
I have a form to input some data into a mySQL table. I would like to allow the user to bold certain statements or words. I notice on most of these bulletin boards that in order to enter any kind of html formatting you enter the appropriate tag surrounded by square brackets ([]) instead sharp brackets (<>). Why is that? I also need, at times to allow users to enter a single quote into the itwCalendar. If they just enter a bare ' without they end with a ' being displayed. Any ideas on how to fix that other than entering a & # 1 3 5 ; in place of the single quote
|
|
#2
|
|||
|
|||
|
RE: html into a mySQL database
the [] brackets are used so that only certain tags can be used. and everything else is stripped from the text with the strip_tags() function. if you allowed any html tag they could completely change your output or load their own page via an iframe and stuff like that. so you simply stip the tags.
the slashes and stuff can be figured out with addslashes() stripslashes() ... you should look at the string functions in the manual for details. http://www.php.net/manual/en/ref.strings.php |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > html into a mySQL database |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|