![]() |
how do you insert html into your database?
the html code contains symbols how do you insert that into mysql database witout getting errors?
for example if i wanted to insert this peice of code into a table how would i insert it witout getting errors :( Code:
<ul> |
nm, i figured it out lol
for those of you who want to know how to do it :) what i did was i put a textarea box on the page to insert the html into (for testing) and i did Code:
$code = urlencode($_POST['txt_code']);then to output it i did while($row = mysql_fetcH_assoc--- bla bla all that stuff then echo urldecode($row['code']); |
Thanks for this info. I was using the htmlentities() and the html_decode_entity() functions.
What is the difference between the htmlentities function and the urlencode functions? |
urlencode just encodes characters that are URL-incompatible. Practically, you would use htmlentities on any output that goes on the screen and is going to be viewed by users. urlencode assumes encoding of URL parts only.
|
| All times are GMT. The time now is 05:04 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0