my database displays html code on webpages
I see the html in myPhpAdmin when I do upates to database fields. This also displays html code on my live pages. Any ideas?
I see the html in myPhpAdmin when I do upates to database fields. This also displays html code on my live pages. Any ideas?
Our MySQLi library has automatic Cross Site Scripting protection. You have to manually disable it in the code when you want it to render html code.
Anywhere you want html code to be rendered you have to update code that looks like this:
$RecordsetName->getColumnVal("ColumnName")
to this:
$RecordsetName->getColumnVal("ColumnName",false)
Adding the false argument at the end tells it to disable the Cross Site Scripting protection and allow html to be rendered on the page.
Thanks Ray, I did look at the post prior to posting this and I believe that I have corrected any mistakes and I still get html coding in my database. It doesn't show on the editor page as I do it but it does show up in the results page and then on the website live page as html coded around the text.
Please attach a copy of the page and include the line number where the wrong code is displayed and I'll take a look.
I could only see where to correct the code was on line 64. I am attaching the page and the look on the results page too.
You sent a copy of the update page and a screen shot of the results page... can I see a copy of the results page. I'd like to work on one page or the other.
Does the content in the html edtior not look correct either? I'd like to get a copy of the page that needs to be fixed... that appears to be the results page based on the attached screenshot.
It shows up as code on the update page when I go back to it as well. Copies attached
On the results page line 275, this code:
<?php echo($WADAcontents->getColumnVal("contContent")); ?>
should be:
<?php echo($WADAcontents->getColumnVal("contContent",false)); ?>
If that still doesn't work, you may have an older version of rsobj.php. I'll attach the latest version, but you might want to also reinstall DataBridge so you have the latest version in future applications.
Thanks Ray, That made it look good on those 2 pages. I still have a problem though of it seems to go into the database table with code that shows as code on the live page.
http://www.jaxgator.com/details.php?contID=3
You have to add the false argument to the getColumnVal() call on any page where you want the html to render instead of display as text.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.