PHP “header (location)” inside IFRAME, to load in _top location?

前端 未结 8 1789
名媛妹妹
名媛妹妹 2020-12-03 10:20

I have a simple form which is inside IFRAME. When user click on SUBMIT, it redirects to a specific page on my server. The function I use for the redirect is



        
8条回答
  •  误落风尘
    2020-12-03 10:46

    A simple way directly in PHP to redirect the parent page rather than the iframe:

    echo "";
    die;
    

    The die; isn't necessarily necessary, but it is good "just in case" to prevent the script from continuing any further, for example, if javascript is disabled in the user's browser.

提交回复
热议问题