SESSION being lost after MySQLi Log In User. How to maintain SESSION value?
I have a page that, when the user is signed in, saves a value (integer) in session once a user has selected it from a drop down menu on a previous page.
<?php
@session_start();
if("" == "") {
$_SESSION["tics"] = "".(isset($_POST['numberoftickets'])?$_POST['numberoftickets']:"") ."";
}
?>
If they're not signed in then the user is presented with a MySQLi Log In User form, on the same page. However, when they sign in the session value is lost.
I assumed this was because, on sign in, we're no longer posting the form value "'numberoftickets'" so I added "'numberoftickets'" as a hidden form field on the sign in form and that's not working either. :(
Urrgh. When a client insists on it working a particular way and it's just plain the wrong way to do things. My suggestion was to make the user sign in before you ask them to make a selection. No. No way. Jeez! :(
How do I retain the original form submission value throughout this process?
Also, what if the user isn't registered. How will I retain this form submission throughout the entire register, confirm etc?
Appreciate any advice offered.
Thank you.
NJ