sesiones que no me funciona
hice una pagina bien simple pero no anda... teoricamente cuando aprete el boton me tendria que imprimir el contenido de $variable, pero no lo hace
cual es mi error... gracias
<?php session_start(); ?>
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
session_register("variable");
echo $variable;
if(isset($_POST["boton"]))
{
$variable=$_POST["valor"];
}
?>
<form name="form1" method="post" action="">
<input name="valor" type="text" id="valor">
<input name="boton" type="submit" id="boton" value="Enviar">
</form>
</body>
</html>
_______________________________________________
Lista de correo [email protected]
http://www.espaciolibre.net/cgi-bin/listinfo/uylug-linux
cual es mi error... gracias
<?php session_start(); ?>
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
session_register("variable");
echo $variable;
if(isset($_POST["boton"]))
{
$variable=$_POST["valor"];
}
?>
<form name="form1" method="post" action="">
<input name="valor" type="text" id="valor">
<input name="boton" type="submit" id="boton" value="Enviar">
</form>
</body>
</html>
_______________________________________________
Lista de correo [email protected]
http://www.espaciolibre.net/cgi-bin/listinfo/uylug-linux
Prueba con este código.
Suerte!
<?php session_start(); ?>
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
if(isset($_POST["boton"]))
{
$variable=$_POST["valor"];
}
session_register("variable");
echo "$variable";
?>
<form name="form1" method="post" action="">
<input name="valor" type="text" id="valor">
<input name="boton" type="submit" id="boton" value="Enviar">
</form>
</body>
</html>
Suerte!
<?php session_start(); ?>
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
if(isset($_POST["boton"]))
{
$variable=$_POST["valor"];
}
session_register("variable");
echo "$variable";
?>
<form name="form1" method="post" action="">
<input name="valor" type="text" id="valor">
<input name="boton" type="submit" id="boton" value="Enviar">
</form>
</body>
</html>
