Forum Moderators: coopster

Message Too Old, No Replies

storing html code into mysql and getting the right output

         

hanyaz

10:02 am on Oct 23, 2008 (gmt 0)

10+ Year Member



hello
what's the best field type to be used for storing html code into mysql database ? i am using text field and see the code stored...however when i try to echo it with php i don t get anything, blank space only.
I have made a trial and replaced the content of the field containing the code by "hello" and when i echo it i see the the word "hello"...so must be something wrong...somewhere but i don t know where exactly
Can anybody help me ?
Thanks

eelixduppy

11:33 am on Oct 23, 2008 (gmt 0)



Have you tried querying the database directly with the command line or with another utility, such as phpmyadmin, to see if that data is actually in there? I would try this first to eliminate any possibility of coding error.

surrealillusions

11:42 am on Oct 23, 2008 (gmt 0)

10+ Year Member



Your html code might be parsed from the database and not displayed. Try wrapping it in <pre> tags to see if that makes a difference.

Failing that (and eelixduppy's suggestion), post up the code your using to insert and display the databases content.

:)