Link to home
Start Free TrialLog in
Avatar of APD Toronto
APD TorontoFlag for Canada

asked on

PHP Target Main

Hi Experts

From a PHP Script, after certain conditions are met, how can I re-direct the user to a page on the main window from an iFrame?

For example, page1.php has an iFrame to page2.php. From page2.php how can I redirect the user to page3.php, but not in the iFrame, but instead of page 1.php

I amt trying the following, but not working.
if ($result['status'] == 'ERR'){
            $js_error = $result['msg'];
            require_once $supp_directory . 'view_supp-details.php';
        } else {
            header('Window-target: _top');
            header('Location: http://www.iwscc.ca/self-registration_thanks/');
   
        }
        

Open in new window

I have also tried _parent
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of APD Toronto

ASKER

I did, but that didn't work neither. Can you help with the js?
Got it