Jump to content

Outputting html source back to .php page from field in MySQL database


adrian28uk

Recommended Posts

I have found a script that allows me to enter rich text via wysiwyg  editor on my site. It works great and inserts the html code to the field [ descripton ] in my database.

 

I am now scratching my head on how I convert this back to my webpage for a preview.

When I output this back to my page it showing me the html code only. the

 

< becomes <

 

" becomes "

 

And so on.

 

I need it to output and convert the html code so it shows the preview

 

Hope you can make some sense of thos.

Be VERY careful with HTML input from untrusted sources. People can throw any data they want into a POST request, including dangerous javascript... if this is outputted to the end user at any point, an XXS attack can be easily performed.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.