OK - I finally figured out how to pass two variables through a link in a string. The only thing is that whenever there is a " ' " (apostrophe) in the string, it displays fine on the next page however there is always a \ (backslash) before it. It's not really a biggie but does anybody know how to get rid of this???
Thanks...
Use the stripslashes function
Originally posted by rupturedtoad Use the stripslashes function
I realize now that I shouldv'e posted in the Newbies Forum - how do I implement the stripslashes function??
$zxc="The cat\'s whiskers"; $zxc=stripslashes($zxc);
$zxc will now contain "The cat's whiskers"
It also strips out other backslash entities like newline (\n) and replaces it with the 'proper' character
I'm displaying the string from a database so the line (ie. title of prod) could be anything! Am I missing the point here?
Where would I put the code? On the page that is passing the var or the page that is outputting it?
I would leave it in the database and strip it before printing
How would I implement the stripslashes function on this line of code:
<? echo "<a href=\"write_review.php?PID=".$product_id."&title=".$row_rs_products['title']."\">