Ok, here is what I do:
<?php
$foo = urlencode("Delete from whatever where ditten = 'datten'"); echo '<a href="foo.php?strSQL=' . $foo . '">Click here to test</a>';
?>
I sidan foo.php skriver jag:
<?php
echo urldecode($_GET["strSQL"]);
?>
and gets the result:
Delete from whatever where ditten = \'datten\'
The question is why PHP escapes the single qoutes? This has never happened to me before, except if I have been using addslashes() or similiar functions…
And they occur even if I don't urlencode at all…
Why!?!?!?!?
Sincerely
Victor Spång Arthursson - Copenhagen
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php