Forum Moderators: coopster
<font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="black"><b><? echo $desc;?></b></font>
Orgin example:
instinct07.php4?page=003&desc=J.P. Calderon ( L ) from "Survivor: Cook Islands" with Ross Matthews from "The Tonight Show with Jay Leno" and Carey Sherrel( R ) from "The Apprentice Season 6".
Turns out to be this:
J.P. Calderon ( L ) from \"Survivor: Cook Islands\" with Ross Matthews from \"The Tonight Show with Jay Leno\" and Carey Sherrel ( R ) from \"The Apprentice Season 6\".
This basically places a description below a photograph.
Any ideas on how to get rid of the \
So the answer to your question is, you have to call strip_slashes prior to displaying it.
I am simply asking the browser to display the "tag line" for photos under the photo itself. The "orgin" page is a list of thumbnails someone clicks on and it loads a picture in a new window with the tag line displayed underneath it.
So when you say "you have to call strip_slashes prior to displaying it." I have no idea what you are talking about. How do I "call" the "strip_slashes" in the following:
instinct07.php4?page=003&desc=J.P. Calderon ( L ) from "Survivor: Cook Islands" with Ross Matthews from "The Tonight Show with Jay Leno" and Carey Sherrel( R ) from "The Apprentice Season 6".
or
<font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="black"><b><? echo $desc;?></b></font>
<font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="black"><b><? echo $desc;?></b></font>
<font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="black"><b><? echo stripslashes($desc);?></b></font>
Posing values from a form, or defining them in the url has exactly the same behavior when it comes to parsing input values. The php will read the input parameters, and adds slashes where appropriate before your script is executed. So if you have a form like this:
<form action="test.php" method="get">
<input type="text" name="test">
<input type="submit">
</form>
So when magic_quotes are in effect, then all input parameters (get values -like form data or url parameters-, post values -from html forms with method set to post- and cookies) are treated in the same way.