cfemocha Posted October 5, 2006 Share Posted October 5, 2006 I have a page that needs user to log in to see the contents. Inside the content there is a link which will open up in a new window. What do I need to do so the new window will recognize the user has already signed in? And how do I pass member datas pulled out from the database to the new window without using the get method (i.e. showing it in the url) ? Quote Link to comment https://forums.phpfreaks.com/topic/23079-pass-sign-in-info-to-new-window/ Share on other sites More sharing options...
Hi I Am Timbo Posted October 5, 2006 Share Posted October 5, 2006 You could either serialize the session and pass it to the new window in a querystring, or you could use javascript and this.opener to get the data (which would be stored in a hidden or something similar).You could also keep track of the session information in the database. Quote Link to comment https://forums.phpfreaks.com/topic/23079-pass-sign-in-info-to-new-window/#findComment-104270 Share on other sites More sharing options...
brown2005 Posted October 5, 2006 Share Posted October 5, 2006 use sessions or cookies.. Quote Link to comment https://forums.phpfreaks.com/topic/23079-pass-sign-in-info-to-new-window/#findComment-104276 Share on other sites More sharing options...
Hi I Am Timbo Posted October 5, 2006 Share Posted October 5, 2006 Ha, I suppose that would work. I was thinking to a new site, I'm sorry. Quote Link to comment https://forums.phpfreaks.com/topic/23079-pass-sign-in-info-to-new-window/#findComment-104278 Share on other sites More sharing options...
cfemocha Posted October 5, 2006 Author Share Posted October 5, 2006 [quote author=brown2005 link=topic=110587.msg447229#msg447229 date=1160063360]use sessions or cookies..[/quote]Im using sessions on the signin page (i.e. $userid = $_SESSION['user_id']; )and my link is like <a href="newwindow.html">new window</a>but $_SESSION['user_id'] does not seem to have been passed to the new window. Am I missing something here?Any help is appreciated.Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/23079-pass-sign-in-info-to-new-window/#findComment-104339 Share on other sites More sharing options...
Hi I Am Timbo Posted October 5, 2006 Share Posted October 5, 2006 probably because newwindow.html is an html page, not php? Quote Link to comment https://forums.phpfreaks.com/topic/23079-pass-sign-in-info-to-new-window/#findComment-104342 Share on other sites More sharing options...
cfemocha Posted October 5, 2006 Author Share Posted October 5, 2006 oops, sorry, it is a php file. Quote Link to comment https://forums.phpfreaks.com/topic/23079-pass-sign-in-info-to-new-window/#findComment-104344 Share on other sites More sharing options...
Hi I Am Timbo Posted October 5, 2006 Share Posted October 5, 2006 are you doing session_start(); there too? Quote Link to comment https://forums.phpfreaks.com/topic/23079-pass-sign-in-info-to-new-window/#findComment-104353 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.