RE: [PHP-ES] pasar variables entre formas
| From: | Hari Seldon | Date: | Wed, 27 Apr 2005 18:30:10 +0000 |
| Subject: | RE: [PHP-ES] pasar variables entre formas | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-54474@lists.php.net to get a copy of this message | ||
No te aconsejo usar register_globals = on ....
Es un fallo de seguridad muy gordo.
Es mejor usar las variables "superglobales" $_GET y $_POST (ó
$HTTP_GET y $HTTP_POST), que son arrays asociativos con los valores que
pasas por GET y por POST, respectivamente.
Por ejemplo:
Por GET:
form.php :
....
<form action="process.php" method="GET" ....
<input type="text" name="variable" ....
....
process.php :
$tuVariable = $_GET['variable']; // aquí deberías implementar cualquier
comprobación o casting que consideres oportuno
Por POST:
form.php :
....
<form action="process.php" method="POST" ....
<input type="text" name="variable" ....
....
process.php :
$tuVariable = $_POST['variable']; // aquí deberías implementar cualquier
comprobación o casting que consideres oportuno
Enlaces interesantes:
http://www.linuxjournal.com/article/6559
http://phpsec.org/projects/guide/
-----Mensaje original-----
De: Grenville Tryon Pera [mailto:gtryonp@hotmail.com]
Enviado el: miércoles, 27 de abril de 2005 19:53
Para: php-es@lists.php.net
Asunto: [PHP-ES] pasar variables entre formas
basico, simple, pero no tan facil de encontrar en internet
register_globals=on, gracias
Saludos,
Grenville Tryon
La primera revista php & MYSQL en el Peru
http://www.phpperu.com
webmaster@phpperu.com
_________________________________________________________________
Visita MSN Latino Noticias: Todo lo que pasa en el mundo y en tu paín, ¡en
tu idioma! http://latino.msn.com/noticias/
--
PHP Spanish Localization Talk Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php