I just start learn PHP, HTML thing, but got bumped in to select options and handling. here is my code:
<select id="VarRole" class="form-control">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</Select>
<select id="VarAcct" class="form-control">
<option value="1">A</option>
<option value="2">B</option>
<option value="3">C</option>
</Select>
if (isset($_POST['VarRole'] && $_POST['VarAcct'])) {
$_SESSION['VarAcct'] = $_POST['VarAcct'];
$_SESSION['VarRole'] = $_POST['VarRole'];
echo '<script type="text/javascript"> location.href = "success.php"; </script>';
}
My goal is to send 2 selected result to become session variables and if success it will redirect to success.php page.
Sorry if my explanation are not quite clear, feel free to ask