Sunday, 18 August 2013

php adding one more backslash

php adding one more backslash

What i'm trying to do is echo the input of the user which is the value of
the get variable named snm. The problem is php is for some reason adding
an extra backslash, how can i stop this? Here is my code:
<html>
<body>
<?php
$string = $_GET['snm'];
echo $string;
?>
</body>
</html>
When i enter \ into the get variable named snm the echo i get is \\
instead of \ which is what i want.

No comments:

Post a Comment