23 Apr
Whenever we open new window with jQuery or JavaScript often it will clear all old session. For example you have a dashboard screen after user login and here have a link to open new window. In that window you want to maintain old logged in session value or have some functionality basis of old session then simply you can pass your php session id to this new window.
Like you are going to open new_page.php then you can use below syntax
mew_page.php?PHPSESSID=<?php echo session_id();?>
that’s it. On this page you can verify session by printing $_SESSION value. Don’t forgot to start php session.
<?php session_start(); print_r($_SESSION); ?>
I am a software engineer who specializes in Internet applications. I have worked with a wide variety of technologies and programming languages to open source LAMP environments. I have more than 6 years of object-oriented programming experience and am highly proficient in ActionScript, PHP, MYSQL, JavaScript, Jquery and a multitude of other technologies used in modern web applications.
Follow me
Latest posts by Rajeev Achra (see all)
- Jquery webcam plugin - June 19, 2016
- How To Add and Delete Users on a CentOSServer - June 5, 2016
- How To Set Up vsftpd on CentOS 6 - June 5, 2016