
Problemas con el $_POST
Publicado por GusGreen (3 intervenciones) el 27/04/2005 17:10:21
Alguien sabe por que esto no funciona? Luego de ingresar valores, deberia mostrarme los valores de cada campo, sin embargo en los campos pepe, solo me muestra el ultimo.
Gracias anticipadas
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Prueba</title>
</head>
<body>
<table>
<form method="post" action='prueba.php'>
<tr><input type="text" name="control">
<tr><input type="text" name="pepe">
<tr><input type="text" name="pepe">
<tr><input type="Submit" name="Aceptar">
</form>
<?
//echo $_POST['control'];
if ($_POST['control'] <> "")
{
$pepe_a = $_POST['pepe'];
echo "<TR> El valor de Control es: " . $_POST['control'];
echo "<TR> El valor 1 es:" . $pepe_a[0];
echo "<TR> El valor 2 es:" . $pepe_a[1];
}
?>
</table>
</body>
</html>
Gracias anticipadas
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Prueba</title>
</head>
<body>
<table>
<form method="post" action='prueba.php'>
<tr><input type="text" name="control">
<tr><input type="text" name="pepe">
<tr><input type="text" name="pepe">
<tr><input type="Submit" name="Aceptar">
</form>
<?
//echo $_POST['control'];
if ($_POST['control'] <> "")
{
$pepe_a = $_POST['pepe'];
echo "<TR> El valor de Control es: " . $_POST['control'];
echo "<TR> El valor 1 es:" . $pepe_a[0];
echo "<TR> El valor 2 es:" . $pepe_a[1];
}
?>
</table>
</body>
</html>
Valora esta pregunta


0