PHP keeps escaping my form's input (adding \ behind my ')
Posted
by Haskella
on Stack Overflow
See other posts from Stack Overflow
or by Haskella
Published on 2010-05-23T12:53:25Z
Indexed on
2010/05/23
13:01 UTC
Read the original article
Hit count: 303
So basically when I type something with an apostrophe, such as John's bike it will echo John\'s bike. The code below:
<?php
$searchname = $_POST["name"] ;
echo "$searchname";
My form uses the POST method. Is there any way to stop this?
© Stack Overflow or respective owner