Nick333
Honorary Master
- Joined
- Nov 17, 2005
- Messages
- 35,114
I am setting two session variables from post values in a controller. They persist after loading the next view but then are mysteriously set to NULL after another view is loaded. All other session variables are untouched regardless of whether I set them before the controller runs or in the same controller.
Controller:
I've tried using native sessions.
This happens in Chrome and Firefox but not Edge.
Thanks in advance.
PHP:
<?php $attributes = array('class' => 'form-group');
echo form_open('dates_validation', $attributes);?>
<label for="arrival_date">Arrival date:</label>
<input class="form-control" type="text" id="datepicker" name="arrival_date"
style="width:120px" onchange="function1()"><br />
<label for="departure_date">Departure date:</label>
<input class="form-control" type="text" id="datepicker2" name="departure_date"
style="width:120px" onchange="function1()"><br />
Controller:
PHP:
$this->session->set_userdata('arrival_date', $_POST['arrival_date']);
$this->session->set_userdata('departure_date', $_POST['departure_date']);
I've tried using native sessions.
This happens in Chrome and Firefox but not Edge.
Thanks in advance.
