Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/04/2006, 08:17
er_pistolon
 
Fecha de Ingreso: julio-2005
Mensajes: 28
Antigüedad: 18 años, 9 meses
Puntos: 0
pasar valor de textfield de una pagina a otra

Hola a todos tengo dos páginas, origen.html, en la cual tengo 3 textfield, y un texto que me va a la´página destino.html, mi problema es que no se como recoger el valor que hay dentro de los tres textfield, porque una vez que tenga estos valores los voy a querer asignar a otros 3 textfields llamados opcion1, opcion2 y opcion3.

El código de origen.html es este:
<html>
<head>
<title>origen.html</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="">
<input type="text" name="textfield1">
<input type="text" name="textfield2">
<input type="text" name="textfield3">

<a href="destino.php?valor1=$textfield1&valor2=$textf ield2&valor3=textfield3">ir a pagina destino.php</a>
</form>
</body>
</html>

y la página destino.html contiene este código:
<html>
<head>
<title>destino.php</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<?
&valor = $_GET["textfield"];

echo "Variable \$textfield1: $valor1 <br> \n";
echo "Variable \$textfield2: $valor2 <br> \n";
echo "Variable \$textfield3: $valor3 <br> \n";

?>
</body>
</html>