RE: [PHP] stripslashes in web forms

From: Date: Mon, 04 Mar 2002 10:14:45 +0000
Subject: RE: [PHP] stripslashes in web forms
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-87065@lists.php.net to get a copy of this message
This should do it: <? $test = "17\" blah"; $test = stripslashes($test); ?> <input type="text" name="test" value="<?=htmlspecialchars($test)?>"> Niklas -----Original Message----- From: Claudiu [mailto:yonix@1a.ro] Sent: 4. maaliskuuta 2002 11:56 To: php-general@lists.php.net Subject: [PHP] stripslashes in web forms Here is the ideea.. i have a string variable $test that contains let's say : 17" Normally the output on the screen of this string would be echo $test; ---> 17 \ There is this function stripslashes which gives me the oportunity to output exactly what i want... i mean 17" .. .but this doesnt seem to work in an input box in a web form... it outputs only 17 and somehow misses the " ... What is there to do? Thanks in advance.. Claus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#87065) next »