Quotes problem

From: Date: Fri, 20 Oct 2000 14:19:52 +0000
Subject: Quotes problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-21395@lists.php.net to get a copy of this message
Hi All When my application receives data from a form I want to display it in an input text field on the next (and all subsequent) pages. I did it but I've one problem: if people put quotes or similar chars on the first form, when I try to show it in the next pages on the input field the stinrg appears cutted or simply show no data. How could I solve the problem ? I tried to enable / disable magic quotes on PHP config without success.... I'm using PHP 4.0.2, Apache 1..3.12 and FastTemplate. To clarify the situation, try the following code. In the first time type "pepe" inside the input text field (exactly WITH quotes). After submit action I want to see "pepe" again, but I see pepe with magic_quotes disable or \"pepe\" with magic_quotes enable. I want the same funtionality than Yahoo, Google, etc.... --------------------------------------------------------------------- <? print "<html><body>"; if ($op) { print "<form method=\"post\" action=\"pquotes.php?op=1\">"; print "<input type=text name=sarlanga size=20 maxlenght=30 value=".$sarlanga.">"; print "<input type=submit value=Enviar>"; print "</form>"; } else { print "<form method=\"post\" action=\"pquotes.php?op=1\">"; print "<input type=text name=sarlanga size=20 maxlenght=30>"; print "<input type=submit value=Enviar>"; print "</form>"; } print "</body></html>"; ?> ----------------------------------------------------------------------------------------------------------------- Javier Any idea ?? Javier

« previous php.general (#21395) next »