Bachiller Industrial

Páginas: 3 (686 palabras) Publicado: 9 de marzo de 2013
<html>
<head>
<title>
Página para realizar sumas
</title>
</head>
<frameset cols="*,*,*">
<frame src="pagina1.html">
<frame src="pagina2.php"name="p2">
<frame src="pagina3.php" name="p3">
</frame>
</html>
P1: <html>
<head>
</head>
<body>
<form action="pagina2.php" method="post"target="p2">
<center><p> Ingrese la cantidad de cuadros: </p>
</center>
<center>
<input type="text" size="10" maxlength="3" name="cantidad">
<input type="submit"value="enviar">
<input type="reset" value="borrar">
</center>
</form>
</body>
</html>
P2: <html>
<head>
</head>
<body>
<formaction="pagina3.php" method="post" target="p3">
<br>
                   
                  
                   
<input type="submit"value="enviar" name ="op">
<INPUT TYPE="reset" value="borrar">
<?php
@$cantidad =$_POST['cantidad'];
if($cantidad < 500)
for ($i = 1; $i < $cantidad+1; $i++)
{
echo '<br>Valor'.$i.': <input type="text" name="cantidad[]" /><br />';
}
else
{
echo ("<p> debe ser menor a 500 </p>");
}
?>
<?php
if(isset($_POST['op']))
{
}
?></body>
</head>
</html>
P3: <html>
<head>
</head>
<body>
<?php
$total = 0;
if (isset($_POST['cantidad']) && !empty($_POST['cantidad'])) {
if(is_array($_POST['cantidad'])) {
$total = array_sum($_POST['cantidad']);
}
}
echo $total;
?>
</body>
</head>
</html>
Vectores: <html>
<?php...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Bachiller Industrial
  • bachiller industrial
  • bachiller industrial
  • bachiller industrial
  • Bachiller Industrial
  • bachiller industrial
  • BACHILLER INDUSTRIAL
  • BACHILLER INDUSTRIAL

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS