Foros del Web » Programando para Internet » PHP »

Pagina de confirmacion

Estas en el tema de Pagina de confirmacion en el foro de PHP en Foros del Web. Hola que tal, soy nuevo al php y queria saber si hay alguna forma de poder sacar los datos de estos Botones Radio y que ...
  #1 (permalink)  
Antiguo 16/01/2008, 10:31
 
Fecha de Ingreso: enero-2008
Mensajes: 11
Antigüedad: 16 años, 3 meses
Puntos: 0
Pregunta Pagina de confirmacion

Hola que tal, soy nuevo al php y queria saber si hay alguna forma de poder sacar los datos de estos Botones Radio y que estos datos me aparezcan en forma de una tabla tipo recibo?


Código:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Arme Su Computadora!</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">
#wrap {
width:810px;

}

span {
float:right;
background-color:#CCCCCC;
color:blue;
width:200px;
display:inline;
text-align:center;
font-weight:bold;

}

legend {
	font-weight: bold;
}

img {
float:left;
}

input {
	float:left;
}

fieldset {
	float:right;
	width: 600px;
	padding: 5px;
	margin-right: 4px;
}

#clear {
	clear:both;
}

#pro {
width:300px;
}

</style>
</head>

<SCRIPT language="javascript">
function cent(amount) {
return (amount == Math.floor(amount)) ? amount + '.00' : ( (amount*10 == Math.floor(amount*10)) ? amount + '0' : amount);
}

function calculate() {
var p1, p2, p3 , p4;
var test = document.forms.test;
p1 = test.precio1.value * 1;
p2 = test.precio2.value * 1;
p3 = test.precio3.value * 1;
p4 = test.precio4.value * 1;

precio_total = p1 + p2 + p3 + p4 ;
test.precio_total.value = cent(Math.round(precio_total*Math.pow(10,2))/Math.pow(10,2));
}

</SCRIPT>
<body>
<div id="wrap">
<div>  <img src="http://www.forosdelweb.com/images/baner.png"> </div>

<form name="test" method="post" action="confirm.php">

<fieldset>
<legend>Datos del Cliente:</legend>
<div id="clear">Nombre:<input type="text" name="Nombre:" ></div>
<div id="clear">Correo Electrónico:<input type="text" name="Correo Electronico:" ></div>
<div id="clear">Telefono:<input type="text" name="Telefono:" ></div>
</fieldset>


<div>
<div id="clear"><img style="padding-top:30px" src="http://www.forosdelweb.com/images/windows-vista.png" name="sistemas" title="sistemas" /></div>
<fieldset >
<legend>Sistemas Operativos:</legend>
<div id="clear"><table><tr><td id="pro"><input name="1" type="radio" value="Windows XP Home" onclick="this.form.precio1.value='1733.00';calculate();"><strong><font color="blue">Windows XP Home</font></strong></td> <td id="pre"><span>
			(Lps. 1733.00)</span></td><br /></tr></table></div>
<div id="clear"><table><tr><td id="pro"><input name="1" type="radio" value="Windows XP Profesional" onclick="this.form.precio1.value='2962.00';calculate();"><strong><font color="blue">Windows XP Profesional</font></strong></td><td id="pre"> <span>(Lps. 2962.00)</span></td><br /></tr></table></div>
<tr><td><input type="hidden" name="precio1"></td></tr>
</fieldset><br />

</div>


<div>
<div id="clear"><img style="padding-top:30px" src="http://www.forosdelweb.com/images/procesador.gif" name="Procesadores" title="Procesadores" /></div>
<fieldset>
<legend>Procesadores</legend>
<div id="clear"><table ><tr><td id="pro"><input name="2" type="radio" value="Procesador Intel Celeron 420 de 1,6 Ghz" onclick="this.form.precio2.value='990.00';calculate();"><strong><font color="blue">Procesador Intel Celeron 420 de 1,6 Ghz </font></strong></td> <td id="pre"><span>(Lps.990.00)</span></td><br /></tr>
</table></div>
<div id="clear"><table ><tr><td id="pro"><input name="2" type="radio" value="Procesador Pentium IV 3,0 Ghz" onclick="this.form.precio2.value='1735.00';calculate();"><strong><font color="blue">Procesador Pentium IV 3,0 Ghz </font></strong></td> <td id="pre"><span>(Lps.1735.00)</span></td><br /></tr>

</table></div>
<div id="clear"><table ><tr><td id="pro"><input name="2" type="radio" value="Procesador Intel Pentium Dual Core E2140 1,66 Ghz" onclick="this.form.precio2.value='1735.00';calculate();"><strong><font color="blue">Procesador Intel Pentium Dual Core E2140 1,66 Ghz </font></strong></td> <td id="pre"><span>(Lps.1735.00)</span></td></td><br /></tr>
</table></div>
<div id="clear"><table ><tr><td id="pro"><input name="2" type="radio" value="30" onclick="this.form.precio2.value='3180.00';calculate();"><strong><font color="blue">Procesador Intel Pentium Core 2 DUO E4400 2,0 Ghz </font></strong></td> <td id="pre"><span>(Lps.3180.00)</span></td><br /></tr>
</table></div>
<input type="hidden" name="precio2">
</fieldset><br />
</div>

<div>
<div id="clear"><img style="padding-top:30px" src="http://www.forosdelweb.com/images/discoduro.png" name="Disco Duro" title="Disco Duro" /></div>

<fieldset >
<legend>Disco Duro</legend>
<div id="clear"><table><tr><td id="pro"><input name="3" type="radio" value="Disco 80 GB" onclick="this.form.precio3.value='1007.00';calculate();"><strong><font color="blue">Disco 80 GB </font></strong></td> <td id="pre"><span>(Lps.1007.00)</span></td><br /></tr></table></div>
<div id="clear"><table><tr><td id="pro"><input name="3" type="radio" value="Disco Duro 160 GB - ide" onclick="this.form.precio3.value='12190.00';calculate();"><strong><font color="blue">Disco Duro 160 GB - ide </font></strong></td> <td id="pre"><span>(Lps.1219.00)</span></td><br /></tr></table></div>
<div id="clear"><table><tr><td id="pro"><input name="3" type="radio" value="Disco Duro 160 GB - sata 2" onclick="this.form.precio3.value='1338.00';calculate();"><strong><font color="blue">Disco Duro 160 GB - sata 2 </font></strong></td> <td id="pre"><span>(Lps.1338.00)</span></td><br /></tr></table></div>
<div id="clear"><table><tr><td id="pro"><input name="3" type="radio" value="Disco Duro 250GB - ide" onclick="this.form.precio3.value='1555.00';calculate();"><strong><font color="blue">Disco Duro 250GB - ide </font></strong></td> <td id="pre"><span>(Lps.1555.00)</span></td><br /></tr></table></div>

<div id="clear"><table><tr><td id="pro"><input name="3" type="radio" value="Disco Duro 320GB - sata" onclick="this.form.precio3.value='2144.00';calculate();"><strong><font color="blue">Disco Duro 320GB - sata </font></strong></td> <td id="pre"><span>(Lps.2144.00)</span></td><br /></tr></table></div>
<div id="clear"><table><tr><td id="pro"><input name="3" type="radio" value="Disco Duro 250GB SATA " onclick="this.form.precio3.value='1860.00';calculate();"><strong><font color="blue">Disco Duro 250GB SATA </font></strong></td> <td id="pre"><span>(Lps.1860)</span></td><br /></tr></table></div>
<div id="clear"><table><tr><td id="pro"><input name="3" type="radio" value="Disco Duro 400GB IDE" onclick="this.form.precio3.value='3492.00';calculate();"><strong><font color="blue">Disco Duro 400GB IDE </font></strong></td> <td id="pre"><span>(Lps.3492)</span></td><br /></tr></table></div>
<input type="hidden" name="precio3">
</fieldset><br />
</div>

<div>

<div id="clear"><img style="padding-top:30px" src="http://www.forosdelweb.com/images/monitor.png" name="Monitores" title="Monitores" /></div><br />
<fieldset>
<legend>Monitores</legend>
<div id="clear"><table><tr><td id="pro"><input name="4" type="radio" value="Monitor Lcd 17' Dell" onclick="this.form.precio4.value='3945.00';calculate();"><strong><font color="blue">Monitor Lcd 17" Dell </font></strong></td> <td id="pre"><span>(Lps.3945.00)</span></td><br /></tr></table></div>
<div id="clear"><table><tr><td id="pro"><input name="4" type="radio" value="Monitor Lcd 19' Dell " onclick="this.form.precio4.value='5151.00';calculate();"><strong><font color="blue">Monitor Lcd 19¨ Dell  </font></strong></td> <td id="pre"><span>(Lps.5151.00)</span></td><br /></tr></table></div>
<div id="clear"><table><tr><td id="pro"><input name="4" type="radio" value="Monitor Flat Panel 15' Soyo" onclick="this.form.precio4.value='2969.00';calculate();"><strong><font color="blue">Monitor Flat Panel 15" Soyo </font></strong></td> <td id="pre"><span>(Lps.2969.00)</span></td><br /></tr></table></div>
<div id="clear"><table><tr><td id="pro"><input name="4" type="radio" value="Monitor Elite crt 15 Pulgadas" onclick="this.form.precio4.value='1437.00';calculate();"><strong><font color="blue">Monitor Elite crt 15 Pulgadas  </font></strong></td> <td id="pre"><span>(Lps.1437.00)</span></td><br /></tr></table></div>

<div id="clear"><table><tr><td id="pro"><input name="4" type="radio" value="30" onclick="this.form.precio4.value='1798.00';calculate();"><strong><font color="blue">Monitor  CRT 17¨ compaq No logo / AOC / LG</font></strong></td> <td id="pre"><span>(Lps.1798.00)</span></td><br /></tr></table></div>
<input type="hidden" name="precio4">
</fieldset><br />
</div>




<div>
<fieldset style="position:relative;top:36px;width:500px;">
<div id="clear"><p><strong><font size="5">Total:</font></strong> 
	<input type="textfield" name="precio_total"></p></div>
<div id="clear"><input type="reset" value="Borrar" onClick="" /><input style="float:right" type="submit" value="continuar" /></div>
</fieldset>
</div>

</form>



</div>    

</body>
</html>

Última edición por Pastrulo; 16/01/2008 a las 13:48 Razón: Correcion...
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 05:44.