Welcome Guest, Not a member yet? Register   Sign In
aren't cookies global?
#5

Well, I managed to get the userid into a session in the other controller. And when I look at the $_SESSION variable (I am stopped in the 2nd controller) in phpStorm, my $_SESSION['userid'] appears to be there. So here is my callback before insert

$crud->callback_before_insert(array($this,'add_email'));

and the call back

  function add_email($post_array){
       $post_array['email']=$_SESSION['userid]'];
       $post_array['email'].=$_SESSION['userid]'];
       return $post_array;
   }

But I can't seem to get the $_SESSION into my post array. When I breakpoint at the return statement, $_SESSION['userid'] is null. Anyone know why?
proof that an old dog can learn new tricks
Reply


Messages In This Thread
aren't cookies global? - by richb201 - 11-09-2017, 02:24 PM
RE: aren't cookies global? - by neuron - 11-09-2017, 11:40 PM
RE: aren't cookies global? - by richb201 - 11-10-2017, 01:51 AM
RE: aren't cookies global? - by dave friend - 11-13-2017, 09:47 AM
RE: aren't cookies global? - by InsiteFX - 11-10-2017, 05:12 AM
RE: aren't cookies global? - by richb201 - 11-11-2017, 11:28 AM
RE: aren't cookies global? - by PaulD - 11-11-2017, 12:29 PM
RE: aren't cookies global? - by richb201 - 11-11-2017, 12:43 PM
RE: aren't cookies global? - by PaulD - 11-11-2017, 12:55 PM
RE: aren't cookies global? - by richb201 - 11-13-2017, 10:56 AM
RE: aren't cookies global? - by dave friend - 11-13-2017, 02:42 PM
RE: aren't cookies global? - by richb201 - 11-13-2017, 03:15 PM
RE: aren't cookies global? - by dave friend - 11-13-2017, 06:29 PM
RE: aren't cookies global? - by richb201 - 11-14-2017, 03:53 PM
RE: aren't cookies global? - by InsiteFX - 11-15-2017, 03:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB