Re: (Era:Como evitar las comillas dobles.) Stripslashesun tanto raro
| From: | Pablo Braulio | Date: | Thu, 08 Nov 2007 09:17:24 +0000 |
| Subject: | Re: (Era:Como evitar las comillas dobles.) Stripslashesun tanto raro | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-61740@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Rolan Benavent escribió:
> Hola Pablo,
> al hacer esto:
>
>> <TD><INPUT type="text" name="nombre" size="50"
>> value="<?php echo
>> stripslashes($r["nombre"]); ?>"></TD>
>
> te ocurre algo parecido a cuando insertas en la BD, ya que la " te
> cierra el value, es decir, te hace esto:
> <TD><INPUT type="text" name="nombre" size="50"
> value="bombonería "el bombón""></TD>
>
> de hecho, si te fijas, también te provoca un fallo en el código html...
> una forma de solucionarlo seria utilizando el htmlentites():
>
> <TD><INPUT type="text" name="nombre" size="50"
> value="<?php echo
> htmlentities(stripslashes($r["nombre"])); ?>"></TD>
>
> y con esto, todo solucionado...
>
> Saludos,
> Rolan.
Estupendo.
Muchisimas gracias.
< ¡¡Nos vemos!! >
----------------------------
\
\
.::!!!!!!!:.
.!!!!!:. .:!!!!!!!!!!!!
~~~~!!!!!!. .:!!!!!!!!!UWWW$$$
:$$NWX!!: .:!!!!!!XUWW$$$$$$$$$P
$$$$$##WX!: .<!!!!UW$$$$" $$$$$$$$#
$$$$$ $$$UX :!!UW$$$$$$$$$ 4$$$$$*
^$$$B $$$$\ $$$$$$$$$$$$ d$$R"
"*$bd$$$$ '*$$$$$$$$$$$o+#"
"""" """""""
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHMtQkK7lGsMchFswRAqNqAKC4kOWvDItPwTi8qlM0Az0jhHD45QCeOgf2
HMX9U5EviGJz1lCYGh37CVE=
=BOIE
-----END PGP SIGNATURE-----