Por que no me funcionan los formularios?
    
		    Hola, voy empezando con PHP y entiendo (o creo entender como funcionan los formularios). Pero al probar cualquier ejemplo de los que ponen por aqui no me funciona. No se que est谩 pasando pero, de hecho el interprete de PHP no me est谩 procesando correctamente ningun formulario, es decir, no env铆a ningun tipo de informaci贸n. ¿Qu茅 podr铆a estar ocurriendo?.
Por ejemplo...este simple formulario no se procesa adecuadamente (simplemente lo toma como si nunca hubiera introducido y enviado dato alguno y vuelve a mostrarme lo mismo cuando le doy enviar. Ayuda!!!¿QUE DEBO HACER?
<html>
<head>
<title>C贸mo introducir informaci贸n en un formulario</title>
</head>
<body>
<?
if ($Enviar)
{
echo "<br>Nombre: <b>".$first_name."</b><br>";
echo "<br>Apellidos: <b>".$last_name."</b>";
echo "<br>Direcci贸n: <b>".$address."</b>";
echo "<br>Ciudad: <b>".$city."</b>";
echo "<br>Estado: <b>".$state."</b>";
echo "<br>C贸digo Postal: <b>".$zip."</b>";
echo "<br>Tel茅fono: <b>".$home_phone."</b>";
// aki podeis procesar la informacion y poner el kodigo para todo lo ke kieras ke se haga sin ke se vea el formulario despues de ke hacen un Submit
}
else
{
?>
<form action="<? $PHP_SELF ?>" method="POST">
<p>Nombre: <input type="text" name="first_name">
<br>Apellidos: <input type="text" name="last_name">
<br>Direcci贸n: <input type="tex" name="address">
<br>Ciudad: <input type="text" name="city">
<br>Estado: <input type="text" name"state">
<br>C贸digo Postal: <input type="text" name="zip">
<br>Tel茅fono: <input type="text" name="home_phone">
<br><br><input type="submit" name="Enviar">
<input type="reset" name="Restablecer"></p>
</form>
<?
} // fin del if
?>
</body>
</html>
    Por ejemplo...este simple formulario no se procesa adecuadamente (simplemente lo toma como si nunca hubiera introducido y enviado dato alguno y vuelve a mostrarme lo mismo cuando le doy enviar. Ayuda!!!¿QUE DEBO HACER?
<html>
<head>
<title>C贸mo introducir informaci贸n en un formulario</title>
</head>
<body>
<?
if ($Enviar)
{
echo "<br>Nombre: <b>".$first_name."</b><br>";
echo "<br>Apellidos: <b>".$last_name."</b>";
echo "<br>Direcci贸n: <b>".$address."</b>";
echo "<br>Ciudad: <b>".$city."</b>";
echo "<br>Estado: <b>".$state."</b>";
echo "<br>C贸digo Postal: <b>".$zip."</b>";
echo "<br>Tel茅fono: <b>".$home_phone."</b>";
// aki podeis procesar la informacion y poner el kodigo para todo lo ke kieras ke se haga sin ke se vea el formulario despues de ke hacen un Submit
}
else
{
?>
<form action="<? $PHP_SELF ?>" method="POST">
<p>Nombre: <input type="text" name="first_name">
<br>Apellidos: <input type="text" name="last_name">
<br>Direcci贸n: <input type="tex" name="address">
<br>Ciudad: <input type="text" name="city">
<br>Estado: <input type="text" name"state">
<br>C贸digo Postal: <input type="text" name="zip">
<br>Tel茅fono: <input type="text" name="home_phone">
<br><br><input type="submit" name="Enviar">
<input type="reset" name="Restablecer"></p>
</form>
<?
} // fin del if
?>
</body>
</html>
		    Prueba con este c贸digo:
<html>
<head>
<title>C贸mo introducir informaci贸n en un formulario</title>
</head>
<body>
<?
if ($Enviar)
{
$first_name=$_POST["$first_name"];
$last_name=$_POST["$last_name"];
$address=$_POST["$address"];
$city=$_POST["$city"];
$state=$_POST["$state"];
$zip=$_POST["$zip"];
$home_phone=$_POST["$home_phone"];
echo "<br>Nombre: <b>".$first_name."</b><br>";
echo "<br>Apellidos: <b>".$last_name."</b>";
echo "<br>Direcci贸n: <b>".$address."</b>";
echo "<br>Ciudad: <b>".$city."</b>";
echo "<br>Estado: <b>".$state."</b>";
echo "<br>C贸digo Postal: <b>".$zip."</b>";
echo "<br>Tel茅fono: <b>".$home_phone."</b>";
}
else
{
?>
<form action="<? $PHP_SELF ?>" method="POST">
<p>Nombre: <input type="text" name="first_name">
<br>Apellidos: <input type="text" name="last_name">
<br>Direcci贸n: <input type="tex" name="address">
<br>Ciudad: <input type="text" name="city">
<br>Estado: <input type="text" name"state">
<br>C贸digo Postal: <input type="text" name="zip">
<br>Tel茅fono: <input type="text" name="home_phone">
<br><br><input type="submit" name="Enviar">
<input type="reset" name="Restablecer"></p>
</form>
<?
}
?>
</body>
</html>
que tengas suerte
Shao !!
	    
    <html>
<head>
<title>C贸mo introducir informaci贸n en un formulario</title>
</head>
<body>
<?
if ($Enviar)
{
$first_name=$_POST["$first_name"];
$last_name=$_POST["$last_name"];
$address=$_POST["$address"];
$city=$_POST["$city"];
$state=$_POST["$state"];
$zip=$_POST["$zip"];
$home_phone=$_POST["$home_phone"];
echo "<br>Nombre: <b>".$first_name."</b><br>";
echo "<br>Apellidos: <b>".$last_name."</b>";
echo "<br>Direcci贸n: <b>".$address."</b>";
echo "<br>Ciudad: <b>".$city."</b>";
echo "<br>Estado: <b>".$state."</b>";
echo "<br>C贸digo Postal: <b>".$zip."</b>";
echo "<br>Tel茅fono: <b>".$home_phone."</b>";
}
else
{
?>
<form action="<? $PHP_SELF ?>" method="POST">
<p>Nombre: <input type="text" name="first_name">
<br>Apellidos: <input type="text" name="last_name">
<br>Direcci贸n: <input type="tex" name="address">
<br>Ciudad: <input type="text" name="city">
<br>Estado: <input type="text" name"state">
<br>C贸digo Postal: <input type="text" name="zip">
<br>Tel茅fono: <input type="text" name="home_phone">
<br><br><input type="submit" name="Enviar">
<input type="reset" name="Restablecer"></p>
</form>
<?
}
?>
</body>
</html>
que tengas suerte
Shao !!
		    Se me olvidaba ....
antes de esta l铆nea " if ($Enviar) ", coloca esto :
$enviar=$_POST["$enviar"];
ahora s铆 ...
Shao !!
	    
    antes de esta l铆nea " if ($Enviar) ", coloca esto :
$enviar=$_POST["$enviar"];
ahora s铆 ...
Shao !!
		    Yo creo que tu problema esta en la configuraci贸n del servidor PHP. Revisa tu archivo de configuraci贸n php.ini y asegurate de que la opci贸n register_globals est茅 en "on" asi
register_globals = On
De todas formas, los valores que envias desde un formulario usando el metodo POST quedan registradas en la variable global $HTTP_POST_VARS y los enviados usando el metodo GET quedan en la variable $HTTP_GET_VARS
Un peque帽o ejemplo para que lo revices
echo "Valores enviados con el m茅todo POST:<br>";
reset ($HTTP_POST_VARS);
while (list ($clave, $val) = each ($HTTP_POST_VARS)) {
echo "$clave => $val<br>";
}
	    
    register_globals = On
De todas formas, los valores que envias desde un formulario usando el metodo POST quedan registradas en la variable global $HTTP_POST_VARS y los enviados usando el metodo GET quedan en la variable $HTTP_GET_VARS
Un peque帽o ejemplo para que lo revices
echo "Valores enviados con el m茅todo POST:<br>";
reset ($HTTP_POST_VARS);
while (list ($clave, $val) = each ($HTTP_POST_VARS)) {
echo "$clave => $val<br>";
}
		    Verifica en el archivo de configuraci贸n de PHP (php.ini) que se encuentra en el directorio de WINDOWS, ahi esta una variable llamada  "register_globals", esta variable en las m谩s recientes versiones de PHP biene setiada en OFF,  con lo que no te permite pasar valores a trav茅s del protoco HTTP que es el que utilizas cuando envias formularios.
Soluci贸n:
Modificar la variable asi:
register_globals = On
Y listo....
Hasta luego...
	    
    Soluci贸n:
Modificar la variable asi:
register_globals = On
Y listo....
Hasta luego...
