Jump to content

stripslashes help


Lodius2000

Recommended Posts

Guys... im rusty and my script is not working right.

 

i have an edit article page.

it goes like this

$article= "pull article text from database where id = whatever
$clean_article= stripslashes($article);
then create a text area with the contents of $clean_article
then write $updated article to the db with addslashes($updated_article);

 

so each time when i use say this line of code <img src="blah"> it should go in the db as

<img src=\"blah\">

and come out of the db as

<img src=\"blah\">

then before i see it is transformed into

<img src="blah">

then goes back in the db as

<img src=\"blah\">

 

instead i am getting this

<img src="blah">

becomes

<img src=\"blah\">

when i put it in the db

then gets put on the page as

<img src=\"blah\">

when i edit the article with the above script i see

<img src=\"blah\">

in the text area the first time

then subsequent times become

<img src=\\\"blah\\\">

and so on

 

what could be the problem

could this be a magic quotes issue?

Link to comment
https://forums.phpfreaks.com/topic/206023-stripslashes-help/
Share on other sites

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.