l!m!t Posted February 7, 2009 Share Posted February 7, 2009 Hello Everyone, This is probably a stupid question and im not even sure if this is correct, but is it possible to put a full array info a session var? Something like... $comments_admin=array( 'message' => $_REQUEST['message'], 'temp1' => $_REQUEST['temp1'], 'temp2' => $_REQUEST['temp1']); $_SESSION['comments_admin']=$comments_admin; Is the above possible to do ? I cant seem to get it working, any suggestion would be great I am still learning. Quote Link to comment Share on other sites More sharing options...
ratcateme Posted February 7, 2009 Share Posted February 7, 2009 that looks good but have you got session_start() somewhere one both pages? Scott. Quote Link to comment Share on other sites More sharing options...
l!m!t Posted February 7, 2009 Author Share Posted February 7, 2009 that looks good but have you got session_start() somewhere one both pages? Scott. Yeah have the session_start, but doesn't seem to register. Maybe I need to call it Global, I thought maybe my code was wrong. I will keep working and see if I can figure it out. Any further suggestions would be great! Quote Link to comment Share on other sites More sharing options...
ratcateme Posted February 7, 2009 Share Posted February 7, 2009 i am guessing the $_REQUEST values are coming from a form? try running your script then this code <?php session_start(); echo "<pre>"; print_r($_SESSION); also are you calling session_start() on every page? Scott. Quote Link to comment Share on other sites More sharing options...
l!m!t Posted February 7, 2009 Author Share Posted February 7, 2009 lol.. I was editing the wrong file. I was in my backup directory, geez an hour wasted.. Thank for your help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.