Click to See Complete Forum and Search --> : Pop up login form


jackoats
12-18-2006, 03:54 PM
I am designing a (PHP/MySQL) site that requires secure login. Currently I have a link which opens a pop up login window, (inside <a href tag.. onClick= "window.open('login.php', 'content_win', 'scrollbars=yes, width=450,height=400') etc...) which the user enters details and then goes to a confirmation page, saying they are logged in and allowing them to change their details, log-out or close the window.
All this works fine, but I would like to employ a pop up window so that if the user is not logged in, the page will not load, but opens a log-in window which must be filled in before the user can see the page. Is this possible using java "onload.."?
Any suggestions?

Zipline
12-18-2006, 06:13 PM
It is possible because your PHP will check the session before the page loads so you can dynamically set an onload value, however, you will probably get knocked down by popup blockers employed by the client.

jackoats
12-18-2006, 07:54 PM
I have a php script that checks the session, but if the user is not locked in it opens the login page in the top window, but then after the user logs in I cannot get the page to return to the sending page. How do I do this? Can you point me to the right script for this?