insert/retrieve html from db

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Anant
Forum Commoner
Posts: 66
Joined: Wed Jul 14, 2010 11:46 am

insert/retrieve html from db

Post by Anant »

Hi ,

Is it fine to insert html data to mysql manually like this -

Code: Select all

insert into test (x)
values("<ul><li>abcdefghijikmno.....</li><ul>")
and retrieve like this -

Code: Select all

$query = select x from test where uid = '1'
$output = mysql_query($output, $db) or die(mysql_error());
I am having issues in retrieving the html - it's blank ..

Any ideas ?
Anant
Forum Commoner
Posts: 66
Joined: Wed Jul 14, 2010 11:46 am

Re: insert/retrieve html from db

Post by Anant »

solved it - the query to retrieve wasn't correct...
Post Reply