Jump to content

Recommended Posts

Hi

I have installed a wysiwyg editor for my form and i wanted to insert an image, so i do and it works great, but when i go to submit it and call it back from the database its all wrong.

Here is an example:

 

Code before Submit:

<h1>Enter your new post</h1><p>More of the example</p>
<p><span><img src="http://lh4.ggpht.com/_Jq9BxxgyOnc/TAV-iAqGrJI/AAAAAAAAAA0/pVNbTVbYIuU/jscrinc.png" title="" align="right"></span><br></p>

 

Code showing on call back:

<h1>Enter your new post</h1><p>More of the example</p><p><span><img src=\"http://lh4.ggpht.com/_Jq9BxxgyOnc/TAV-iAqGrJI/AAAAAAAAAA0/pVNbTVbYIuU/jscrinc.png\" title=\"\" align=\"right\">

 

Image URL on call back:

http://jscrgaming.co.uk/%22http://lh4.ggpht.com/_Jq9BxxgyOnc/TAV-iAqGrJI/AAAAAAAAAA0/pVNbTVbYIuU/jscrinc.png/%22..

 

Im wondering if its anything to do with the submitting of the form or not.

Please Help

James

Link to comment
https://forums.phpfreaks.com/topic/203732-image-html-hasnt-submitted-correctly/
Share on other sites

http://us2.php.net/magic_quotes

 

If the data contains escape characters \, either it was escaped an extra time (once by php due to magic_quotes_gpc and once by your code) when it was put into the database or it is being escaped (by php due to magic_quotes_runtime) when it is being retrieved from the database.

 

If the escaping is done correctly (i.e. only your code is escaping the data once before it is put into the query), the escape characters \ are NOT present in the database.

 

If the escape characters \ are present in the database, then magic_quotes_gpc is causing the problem. If the escape characters \ are NOT present in the database, then magic_quotes_runtime is causing the problem.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.