$ _SESSION没有在表单上选择正确的值

I'm trying to store a $_SESSION variable on a form option for further use on the next page after submit (which will be reloaded and used multiple times after that, so a simple $_POST won't do)

the problem is that it doesn't matter what option I choose, it always saves the value from the last option ("Victoria" in this case) as if I picked that one.

session_start(); is already declared on top of the page

Am I missing something? Here is the form:

<form method="post">

  <label for="turno">Turno:</label>
  <select name="turno" id="turno">
  <option value=DIA>Dia</option>
  <option value=NOCHE>Noche</option>
  </select>
  <label for="planillera">Planillera:</label>
  <select name="planillera" id="planillera">
  <option value="<?php $_SESSION['planillera']  = 'Rosa'; ?>">Rosa</option>
  <option value="<?php $_SESSION['planillera']  = 'Cristina'; ?>" >Cristina</option>
  <option value="<?php $_SESSION['planillera']  = 'Maria'; ?>" >Maria</option>
  <option value="<?php $_SESSION['planillera']  = 'Romina'; ?>">Romina</option>
  <option value="<?php $_SESSION['planillera']  = 'Julieta'; ?>" >Julieta</option>
  <option value="<?php $_SESSION['planillera']  = 'Victoria'; ?>" >Victoria</option>
  </select>

<input type="submit" id='enviar' value="Registrar viaje" formaction="registrar_viaje.php">


</form>

</div>

That's not how $_SESSION or select works.

What you are doing is simply executing PHP where you set value of $_SESSION multiple times - hence why it always assigns the last value.

Your select should look like this:

  <select name="planillera" id="planillera">
  <option value="Rosa">Rosa</option>
  <option value="Cristina">Cristina</option>
  <option value="Maria">Maria</option>
  <option value="Romina">Romina</option>
  <option value="Julieta">Julieta</option>
  <option value="Victoria">Victoria</option>
  </select>

Then in the inside of registrar_viaje.php you would do:

$_SESSION['plankillera'] = $_POST['planillera'];

Lastly, you would do a redirect to another page.