Google
Web dns.bdat.net

RE: [PHP-ES] pasar variables entre formas

Write haof XML files: Hari Seldon ( hari.seldon@telefonica.net)
Fecha: mié 27 abr 2005 - 20:30:10 CEST


        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
-- 
PHP Spanish Localization Talk Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Este archivo fue generado por hypermail 2.1.7 : sáb 18 mar 2006 - 18:49:33 CET