Home » questions » how do you allow tags to be saved in MYSQL?
how do you allow tags to be saved in MYSQL?
hey, question again, how do you allow html tags to be saved in MYSQL??
say i have a textbox, and the info from that box gets sent to mysql... automatically, html tags get stripped before they get placed in the mysql base. i want them to stay, how do i avoid the automatic tag stripping of CERTAIN database fields???
so for example:
i have a field called "aboutme"
and a textbox on a page. users can enter upto 2500 characters in aboutme textbox, when subbmitted all gets sent to the aboutme field.
say a user puts the following in the textbox:
Hello, my name is DEMO<-br><-br>I like to eat lots!!!<-br><-br><-b>I'm 20<-/b>
---
(btw, i put a - before each tag, so yahoo wouldnt read it as a tag ;-) )
now i want those tags (but in real format) to get saved to MySQL, so when i call that field (aboutme), it will show the html in format!
please help,
thanks
alex
best answer that works, gets 12pts
thanks all!
i cant believe it, it took me 1000 characters just for someone to say "it's in the php file!"
and well and behold, IT IS!
i had this thing that said
"$aboutme = strip_tags($_POST[aboutme]);"
than told the next command to set the field about me to $aboutme.
next problem, does anyone know how to outlaw Javascript tags using php/mysql?

Answers
DX
On 2006-08-09 13:24:28
Interested Dude
On 2006-08-09 13:29:36
jmfc
On 2006-08-09 13:22:34