I currently got this code
Code: Select all
echo "parent.window.location='http://mydomain/';"; //main window
echo "window.location='http://mydomain.com/php/account.php?action=login&logout=true';"; //iframe
I know parent.window.location work, so does window.location for the iframe, but it only does one of the actions, the first one.
The reason to use both of them is when you login you get extra buttons to the menu, and when you logout i need it to refresh the website to remove the buttons, and still redirect the iframe to the login form with a cute good-bye message.