Pro favor????
Publicado por hroman (9 intervenciones) el 18/08/2006 19:29:53
Hola tengo una página que pueden verla en:
http://www.ticoarts.com/911.php
En este el usuario selecciona un tipo de procesador, pero despues de esto los resultados van a la pagina 2 donde necesito que vea el tipo de procesador que selecciono y tambien el valor del procesador. Esto lo he intentado con un campo hidden y con variables, pero definitivamente no se ve el precio en la otra pagina. Aqui dejo el código de las 2 páginas. Agradezco la ayuda que me puedan brindar.
**************
* PAGINA 1 *
**************
<html>
<head>
<title>COMPUTADORAS</title>
<LINK REL="stylesheet" TYPE="text/css" HREF="estilo.css">
</head>
<BODY>
<center>
<br>
<H1>Obtenga su propia cotización</H1>
<p>Seleccione sus datos</p>
<FORM ACTION="result.php" METHOD="POST">
<TABLE border="1">
<tr><td aling="right">Procesador:
<td><select name="_procesador">
<option value=""selected>Seleccione</option>
<?php
$link=mysql_connect ("localhost","user","") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("mydb");
$result = mysql_query ("select * from procesadores",$link);
while($row=mysql_fetch_row($result)){
?>
<type="hidden" name=_precio value=<?=$row[2]?>>
<option value="<?=$row[1]?>"><?=$row[1]?></option>
<?php
}
?>
</select>
</TABLE>
</center>
<center>
<TABLE>
<tr>
<td width="100%">
<p align="center">
<input type="submit" value="Enviar" name="enviar" tabindex="1"><input type="reset"Value="Restablecer"></td>
</TR>
</TABLE>
</center>
</FORM>
</BODY>
</html>
**************
* PAGINA 2 *
**************
<html>
<head>
<title>Resultados del formulario</title>
<LINK REL="stylesheet" TYPE="text/css" HREF="estilo.css">
</head>
<body>
<br>
<h1><p align="center">Estos son los datos introducidos</p></h1>
<center>
<TABLE border="1" cellpadding="1" cellspacing="1" width="25%">
<tr>
<th>Procesador</th>
<?PHP
print ("<TD>$_procesador</TD> \n");
?>
<tr>
<th>Precio</th>
<?PHP
print "$_precio<br>\n";
?>
</tr>
</TABLE>
</center>
<br>
<center>
[ <A HREF='javascript:history.back()'>Volver</A> ]
</center>
</body>
</html>
http://www.ticoarts.com/911.php
En este el usuario selecciona un tipo de procesador, pero despues de esto los resultados van a la pagina 2 donde necesito que vea el tipo de procesador que selecciono y tambien el valor del procesador. Esto lo he intentado con un campo hidden y con variables, pero definitivamente no se ve el precio en la otra pagina. Aqui dejo el código de las 2 páginas. Agradezco la ayuda que me puedan brindar.
**************
* PAGINA 1 *
**************
<html>
<head>
<title>COMPUTADORAS</title>
<LINK REL="stylesheet" TYPE="text/css" HREF="estilo.css">
</head>
<BODY>
<center>
<br>
<H1>Obtenga su propia cotización</H1>
<p>Seleccione sus datos</p>
<FORM ACTION="result.php" METHOD="POST">
<TABLE border="1">
<tr><td aling="right">Procesador:
<td><select name="_procesador">
<option value=""selected>Seleccione</option>
<?php
$link=mysql_connect ("localhost","user","") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("mydb");
$result = mysql_query ("select * from procesadores",$link);
while($row=mysql_fetch_row($result)){
?>
<type="hidden" name=_precio value=<?=$row[2]?>>
<option value="<?=$row[1]?>"><?=$row[1]?></option>
<?php
}
?>
</select>
</TABLE>
</center>
<center>
<TABLE>
<tr>
<td width="100%">
<p align="center">
<input type="submit" value="Enviar" name="enviar" tabindex="1"><input type="reset"Value="Restablecer"></td>
</TR>
</TABLE>
</center>
</FORM>
</BODY>
</html>
**************
* PAGINA 2 *
**************
<html>
<head>
<title>Resultados del formulario</title>
<LINK REL="stylesheet" TYPE="text/css" HREF="estilo.css">
</head>
<body>
<br>
<h1><p align="center">Estos son los datos introducidos</p></h1>
<center>
<TABLE border="1" cellpadding="1" cellspacing="1" width="25%">
<tr>
<th>Procesador</th>
<?PHP
print ("<TD>$_procesador</TD> \n");
?>
<tr>
<th>Precio</th>
<?PHP
print "$_precio<br>\n";
?>
</tr>
</TABLE>
</center>
<br>
<center>
[ <A HREF='javascript:history.back()'>Volver</A> ]
</center>
</body>
</html>
Valora esta pregunta


0