ok so i have two selection boxes, upon me pressing submit on the form it takes the POST data and creates a session variable for each of them. These session variables are then used to fill the selection box with what the user has selected. However, i need to reuse the data as POST after it is submitted, but its my html is saying the field is blank even though it is displaying the session variable.
So im thinking the actual selection box is empty when filled with the session, even though i can see it? I need to manipulate this data later on, so how can i make my php recognize it as POST after my form has been submitted.
if any more code is needed please let me know
<select name="team-1" required>
<option value='Holder' disabled selected>
<?php
if(isset($_SESSION['t_team1'])){ //echoes currently set team
echo $_SESSION['t_team1'];
}else {
echo "Team 1";
}
?>
</option> <!--Placeholder for Select-->
<?php
while($rows = $teamSet->fetch_assoc()){ //Fills select with teams matching cup
$teamName = $rows['team_name'];
echo " <option value='$teamName'>$teamName</option>";
}
?> <?php mysqli_data_seek($teamSet, 0); ?> <!--RESETS WHILE LOOP, DUPLICATE AFTER EVERY TEAM "WET"-->
</select>