You are on page 1of 7

Nombre: Erwin Bustamante Lazo Alexander

Curso: DSD05-06

Materia: PROGRAMACION WEB

Tema: : CONTROL DE MENSUALIDADES USANDO CONDICIONAL ANIDADO


<html>

<head>

<meta charset="UTF-8">

<title>Mensualidad de Univerdidad</title>

<style>

header{font-size: 20px}

</style>

</head>

<body>

<header>Mensualidad de Univerdidad</header>

<img src=educacion.jpg width="400" height="341" >

<?php

error_reporting(0);

$A=$_POST['selA'];

$B=$_POST['selB'];

$C=$_POST['selC'];

$D=$_POST['selD'];

$categoria=$_POST['selCategoria'];

if($categoria=='A')

$selQ='SELECTED';

else

$selQ='';

if ($categoria=='B')

$selW = 'SELECTED';

else

if ($categoria=='C')

$selE = 'SELECTED';

else

if ($categoria=='D')
This study source was downloaded by 100000813666932 from CourseHero.com on 05-07-2022 14:56:28 GMT -05:00

https://www.coursehero.com/file/103889136/Tarea-Virtual-3pdf/
$selR = 'SELECTED';

else

$selR= '';

?>

<?php

error_reporting(0);

$menor12=$_POST['selMenor12'];

$entre13y15=$_POST['selEntre13y15'];

$entre16y17=$_POST['selEntre16y17'];

$entre18y19=$_POST['selEntre18y19'];

$iguala20=$_POST['selIguala20'];

$promedio=$_POST['selPromedio'];

if($promedio=='Menor12')

$selJ='SELECTED';

else

$selJ='';

if ($promedio=='Entre13y15')

$selA = 'SELECTED';

else

if ($promedio=='Entre16y17')

$selB = 'SELECTED';

else

if ($promedio=='Entre18y19')

$selC = 'SELECTED';

else

$selC= '';

if ($promedio=='Iguala20')

$selD = 'SELECTED';

else

$selD= '';
This study source was downloaded by 100000813666932 from CourseHero.com on 05-07-2022 14:56:28 GMT -05:00

https://www.coursehero.com/file/103889136/Tarea-Virtual-3pdf/
?>

<form method="Post" name="frmSalario" action="index.php">

<table border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="150">Nombre: </td>

<td><input type="text"</td>

</tr>

<td>Categoria</td>

<td>

<select name="selCategoria">

<option value="A"<?php echo $selQ;?> >A</option>

<option value="B"<?php echo $selW;?>>B</option>

<option value="C"<?php echo $selE;?>>C</option>

<option value="D"<?php echo $selR;?>>D</option>

</select>

</td><br>

<tr>

<td>Promedio</td>

<td>

<select name="selPromedio">

<option value="Menor12"<?php echo $selJ;?> >Menor12</option>

<option value="Entre13y15"<?php echo $selA;?>>Entre13y15</option>

<option value="Entre18y19"<?php echo $selC;?>>Entre18y19</option>

<option value="Iguala20"<?php echo $selD;?>>Iguala20</option>

</select>

</td>

</tr> <tr>

<td></td>

<td>

<input type="submit" value="Calcular" name="btnCalcular"/>

</td>

</tr>

<?php

if ($categoria=='A'){
This study source was downloaded by 100000813666932 from CourseHero.com on 05-07-2022 14:56:28 GMT -05:00

https://www.coursehero.com/file/103889136/Tarea-Virtual-3pdf/
$A=850;

if($promedio=='Menor12'){

$sporcentaje=$A*0;

$total=$A+$sporcentaje;

if($promedio=='Entre13y15'){

$sporcentaje=$A*0.10;

$total=$A+$sporcentaje;

if($promedio=='Entre16y17'){

$sporcentaje=$A*0.15;

$total=$A+$sporcentaje;

if($promedio=='Entre18y19'){

$sporcentaje=$A*0.25;

$total=$A+$sporcentaje;

if($promedio=='Iguala20'){

$sporcentaje=$A*0.50;

$total=$A+$sporcentaje;

if ($categoria=='B'){

$B=750;

if($promedio=='Menor12'){
This study source was downloaded by 100000813666932 from CourseHero.com on 05-07-2022 14:56:28 GMT -05:00

https://www.coursehero.com/file/103889136/Tarea-Virtual-3pdf/
$sporcentaje=$B*0;

$total=$B+$sporcentaje;

if($promedio=='Entre13y15'){

$sporcentaje=$B*0.10;

$total=$B+$sporcentaje;

if($promedio=='Entre16y17'){

$sporcentaje=$B*0.15;

$total=$B+$sporcentaje;

if($promedio=='Entre18y19'){

$sporcentaje=$B*0.25;

$total=$B+$sporcentaje;

if($promedio=='Iguala20'){

$sporcentaje=$B*0.50;

$total=$B+$sporcentaje;

if ($categoria=='C'){

$C=650;

if($promedio=='Menor12'){

$sporcentaje=$C*0;

$total=$C+$sporcentaje;
This study source was downloaded by 100000813666932 from CourseHero.com on 05-07-2022 14:56:28 GMT -05:00

https://www.coursehero.com/file/103889136/Tarea-Virtual-3pdf/
}

if($promedio=='Entre13y15'){

$sporcentaje=$C*0.10;

$total=$C+$sporcentaje;

if($promedio=='Entre16y17'){

$sporcentaje=$C*0.15;

$total=$C+$sporcentaje;

if($promedio=='Entre18y19'){

$sporcentaje=$C*0.25;

$total=$C+$sporcentaje;

if($promedio=='Iguala20'){

$sporcentaje=$C*0.50;

$total=$C+$sporcentaje;

if ($categoria=='D'){

$D=550;

if($promedio=='Menor12'){

$sporcentaje=$D*0;

$total=$D+$sporcentaje;

if($promedio=='Entre13y15'){

$sporcentaje=$D*0.10;

$total=$D+$sporcentaje;
This study source was downloaded by 100000813666932 from CourseHero.com on 05-07-2022 14:56:28 GMT -05:00

https://www.coursehero.com/file/103889136/Tarea-Virtual-3pdf/
}

if($promedio=='Entre16y17'){

$sporcentaje=$D*0.15;

$total=$D+$sporcentaje;

if($promedio=='Entre18y19'){

$sporcentaje=$D*0.25;

$total=$D+$sporcentaje;

if($promedio=='Iguala20'){

$sporcentaje=$D*0.50;

$total=$D+$sporcentaje;

?>

<tr>

<td>Salario Bruto</td>

<td><?php echo "$".number_format($total,2,'.','');?>

</td>

</tr>

</table>

</form>

</body>

</html>

This study source was downloaded by 100000813666932 from CourseHero.com on 05-07-2022 14:56:28 GMT -05:00

https://www.coursehero.com/file/103889136/Tarea-Virtual-3pdf/
Powered by TCPDF (www.tcpdf.org)

You might also like