Programacion Html

Páginas: 15 (3515 palabras) Publicado: 23 de mayo de 2012
2.-Dado un número del 1 al 7 indique a que día de la semana corresponde:
<?
$txtdato=$_REQUEST['txtdato'];
$txtdia=$_REQUEST['txtdia'];
$btnAccion=$_REQUEST['btnAccion'];
switch($btnAccion){
case 'Procesar':
if($txtdato==1){
$txtdia='Lunes';
}else{
if($txtdato==2){
$txtdia='Martes';
}else{
if($txtdato==3){$txtdia='Mircoles';
} else{
if($txtdato==4){
$txtdia='Jueves';
}else{
if($txtdato==5){
$txtdia='Viernes';
}else{
if($txtdato==6){
$txtdia='Sabado';
}else{
if($txtdato==7){
$txtdia='Domingo';

}else{
$txtdia='Incorrecto';}
}
}
}
}
}
}
break;
case 'Limpiar':
$txtdato="";$txtdia="";
break;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Sans Titre</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="generator" content="HAPedit 3.1">
</head>
<bodybgcolor="#FFFFFF"><form action="<? echo $PHP_SELF; ?>" name="Cargar_Datos" method="post">
<fieldset>
<legend>Formulario</legend>

<label>Dato</label>
<input type="text" name="txtdato" value="<? echo $txtdato; ?>" size="10" maxlength="20" /> <br />
<label>El dia es</label>
<input type="text"name="txtfdia" value="<? echo $txtdia; ?>" size="10" maxlength="20" /> <br />
<br />
<hr />
<input type="submit" name="btnAccion" value="Procesar" />
<input type="submit" name="btnAccion" value="Limpiar" />
</fieldset>
</form>
<?
// Your code here
echo "<hr />\n".
"HAPedit3.1.11.111 (diciembre 2010 18:51:48)";
?>
</body>
</html>

11. En un centro Meteorológico se llevan las precipitaciones mensuales caídas en tres zonas del país: Occidente, Centro y Oriente. Se desea un programa que reciba como datos de entrada las precipitaciones registradas en los 12 meses de un año para cada región y determine: Precipitación anual en cada región y b) regióncon mayor precipitación anual.
<?
$txtenero=$_REQUEST['txtenero'];
$txtfebrero=$_REQUEST['txtfebrero'];
$txtmarzo=$_REQUEST['txtmarzo'];
$txtabril=$_REQUEST['txtabril'];
$txtmayo=$_REQUEST['txtmayo'];
$txtjunio=$_REQUEST['txtjunio'];
$txtjulio=$_REQUEST['txtjulio'];
$txtagosto=$_REQUEST['txtagosto'];
$txtseptiembre=$_REQUEST['txtseptiembre'];$txtoctubre=$_REQUEST['txtoctubre'];
$txtnoviembre=$_REQUEST['txtnoviembre'];
$txtdiciembre=$_REQUEST['txtdiciembre'];
$txttotalanual=$_REQUEST['txttotalanual'];
$txtenero1=$_REQUEST['txtenero1'];
$txtfebrero1=$_REQUEST['txtfebrero1'];
$txtmarzo1=$_REQUEST['txtmarzo1'];
$txtabril1=$_REQUEST['txtabril1'];
$txtmayo1=$_REQUEST['txtmayo1'];
$txtjunio1=$_REQUEST['txtjunio1'];$txtjulio1=$_REQUEST['txtjulio1'];
$txtagosto1=$_REQUEST['txtagosto1'];
$txtseptiembre1=$_REQUEST['txtseptiembre1'];
$txtoctubre1=$_REQUEST['txtoctubre1'];
$txtnoviembre1=$_REQUEST['txtnoviembre1'];
$txtdiciembre1=$_REQUEST['txtdiciembre1'];
$txttotalanual1=$_REQUEST['txttotalanual1'];
$txtenero2=$_REQUEST['txtenero2'];
$txtfebrero2=$_REQUEST['txtfebrero2'];$txtmarzo2=$_REQUEST['txtmarzo2'];
$txtabril2=$_REQUEST['txtabril2'];
$txtmayo2=$_REQUEST['txtmayo2'];
$txtjunio2=$_REQUEST['txtjunio2'];
$txtjulio2=$_REQUEST['txtjulio2'];
$txtagosto2=$_REQUEST['txtagosto2'];
$txtseptiembre2=$_REQUEST['txtseptiembre2'];
$txtoctubre2=$_REQUEST['txtoctubre2'];
$txtnoviembre2=$_REQUEST['txtnoviembre2'];
$txtdiciembre2=$_REQUEST['txtdiciembre2'];...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Programacion Html
  • lenguaje de programación html
  • lenguajes de programación y el HTML
  • lenguaje de programación web HTML
  • Programacion basica en html
  • Programacion html
  • Programacion HTML
  • programación html

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS