How do I, when the user selects an option, the $idCourse
PHP variable receives the value
of the selected option.
I made this code just to show the idea:
Code
<select name="valor" id="idCourse">
<option value="1">Curso 1</option>
</select>
<?php
$idCourse = $_POST['valor'];
$result = $pdo->selectAll($idCourse);
?>