I have a text box in an HTML form where the user will input some information and press submit. This data will be submitted to the same page, so I want to show in the text box the last submitted value.
I was trying this:
<input name="srq" type="text" id="search_box" <?php if($_GET["srq"]) echo 'value="'.$_GET["srq"].'"'; ?> />
But that will turn “‘hello'” into “\’hello\'”. What is the right way to do this?
One solution may be to turn off the magic_quotes_gpc in php settings or other one is to use stripslashes in $_GET[“srq”]
I presume you understand how unsecured is that?