re:store html codes in text field (mysql)

From: Date: Wed, 07 Jan 2009 09:51:55 +0000
Subject: re:store html codes in text field (mysql)
Groups: php.db 
Request: Send a blank email to php-db+get-45865@lists.php.net to get a copy of this message
Sorry if this has been asked before but I cant seem to find anything useful via google...... I have a text fields which stores my textarea input from a user, my design is meant to allow user to submit html codes...but mysql seem to replace all html tags with something else... Example: $title="some text"; $html_code=<h1>heading 1</h1> INSERT INTO $db_table VALUES(null,'$title','$html_code')"; Result in my dB: 1]some text 2]&lt;h1&gt;heading &lt;h1&gt; How can I solve this problem of mysql replacing the html tags.....?This is probably something familiar to webdev, but I am kind of a noob in web programming... Thanks alot for your time... muhsin N:B The only way I can think of is replacing them after pulling them out of the dB, but I am not sure if this is the way to go... -- Extra details: OSS:Gentoo Linux-2.6.25-r8 profile:x86 Hardware:msi geforce 8600GT asus p5k-se location:/home/muhsin language(s):C/C++,VB,VHDL,bash Typo:40WPM url:http://mambo-tech.net

« previous php.db (#45865) next »