I'm working with PHP and JavaScript .
I have a select
, which is filled in by bringing the data from a BD .
What I try to do is that when selecting an option of select
, it is disabled so that the user can not access that option again.
Can someone help me out? '
Here I leave a bit of my code:
<select id="Cursos"> </center>
<option id="opt0" value="#">Seleccione su curso</option>
<?php
while($curso=pg_fetch_array($resultado)){
?>
<option id="opt1" value="<?php echo $curso[id_curso] ?>"><?php echo $curso[1] ?> </option> <?php } ?>
</select>
<input type="submit" name="btn1" onclick="quest00.php" value="Ir al curso">
<script> </script>