<div class="6u 12u$(xsmall)">
									Edad:	<label for="demo-priority-normal">
									<?php 
if (isset($edad)) {
    echo $edad;
}
?>
</label>
								</div>

								<div class="6u 12u$(xsmall)">
									<div class="select-wrapper">
										<select name="cursos" id="demo-area ">
											<?php 
if (isset($edad)) {
    $cursos = lista_cursos($edad);
    foreach ($cursos as $curso) {
        echo utf8_encode("<option value='" . $curso["ID_CURSO"] . "'>" . $curso["NOMBRE_CURSO"] . "</option>");
    }
}
?>
										</select>
									</div>
								</div>

 								<div class="12u$">
									<ul class="actions">
										<li><input type="submit" value="Registrar" class="special" /></li>
									</ul>
								</div>
							</div>
예제 #2
0
    foreach ($estudiantes as $est) {
        $e = $est;
        $e->set_edad(calcular_edad($_POST["cedula"]));
        echo "Nombre: " . $e->get_nombre() . "<br>";
        echo "Apellido: " . $e->get_apellido() . "<br>";
        echo "Cedula: " . $e->get_CI() . "<br>";
        echo "Edad: " . $e->get_edad() . "<br>";
    }
}
echo "<h2>Registro de cursos</h2>";
echo "<form name=form action=" . $_SERVER['PHP_SELF'] . "?cedula=1111 method='post'>";
echo "<table>";
echo "<tr><th><h4>Cedula de Identidad</th><td><input type='text' name=cedula value='{$cedula}'></td></tr>";
echo "<tr><th><h4>Correo</th><td><input type='email' name=email value='{$email}'></td></tr>";
echo "<tr><th><h4>Cursos</th><td>";
$cursos = lista_cursos();
echo "<select name=cursos>";
foreach ($cursos as $curso) {
    echo "<option value='" . $curso["NOMBRE_CURSO"] . "'>" . $curso["NOMBRE_CURSO"] . "</option>";
}
echo "</select></td></tr>";
echo "</table><br><br>";
echo "<input type='submit' value='Validar'>";
echo "</form>";
?>

<!-- <form action="demo_form.asp" method="get">
  <input list="browsers" name="browser">
  <datalist id="browsers">
    <option value="Internet Explorer">
    <option value="Firefox">