Reputation: 31
I'm lossing the session when I submit a form, until them I kept loged in my code.
I'm sending the session values through the form in that way, but it does not work at all:
<input type='hidden' name='loged' value='".$_SESSION["loged"]."'>
<input type='hidden' name='role' value='".$_SESSION["role"]."'>
Is that right?
Thanks you
of course before I get loged, I alredy worte this on the code:
session_start();
Upvotes: 0
Views: 1028
Reputation: 7001
You are submitting the form ... if you do a phpinfo();
you'll see that the inputs have now arrived as value under $_REQUEST
... If you want to access the session variables again, you need to:
You'll see your session vars again.
Upvotes: 0