robgood Posted September 2, 2007 Share Posted September 2, 2007 Hi, just a quick question. Can i use sessions to send values between two different URL's or will i have to send variables across in a form? thanks for your help Quote Link to comment https://forums.phpfreaks.com/topic/67636-solved-sessions-between-two-urls/ Share on other sites More sharing options...
sirish Posted September 2, 2007 Share Posted September 2, 2007 Yes you can. $_SESSION, $_GET, $_POST, $_COOKIES are global variables and are used to preserve the state of a variable. You can easily access it in different urls Quote Link to comment https://forums.phpfreaks.com/topic/67636-solved-sessions-between-two-urls/#findComment-339758 Share on other sites More sharing options...
robgood Posted September 2, 2007 Author Share Posted September 2, 2007 just tried it and it didn't work....I mean between two different websites (www.mywebsite1.com and www.my-secure-payment-page-on-another-url.com)? Want to pass the contents of the basket to this page. Obviously easier to do in a sessions rather than sending in a hidden form field? Basically, it's is my webhosts shared secured ssl page. Thanks for your help. Quote Link to comment https://forums.phpfreaks.com/topic/67636-solved-sessions-between-two-urls/#findComment-339763 Share on other sites More sharing options...
robgood Posted September 2, 2007 Author Share Posted September 2, 2007 Just in case anyone else finds this post and has the same problem I used impolde() on array and passed in form and then explode() to change back into array on receiving page. Use serialize() and unserialize() for multidimensional arrays. good link here - http://www.faqts.com/knowledge_base/view.phtml/aid/119 Quote Link to comment https://forums.phpfreaks.com/topic/67636-solved-sessions-between-two-urls/#findComment-339797 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.