Jump to content

Open PHP page in Parent window...


obaluba

Recommended Posts

Hi,

I think this is fairly simple although I have been tearing my hair out all day! Basically.. I have a html page which has an iframe on it which loads a php page which contains a form. Once the form is filled out I have this code to return it to another html page. currently the html page is loading in the iframe, I need to find a way to make it load in the parent of the iframe if you like...

The code I have is below for this section...

$ThankYou = $_GET['ThankYou'];
if ($ThankYou != "") {
    $message    = "Thankyou, you will now be forwarded to the technical section.";

header("HTTP/1.1 301 Moved Permanently");
header ("Location: http://www.google.com");
}

I tried adding this having found it on another site:
header("target_parent");

but didnt seem to work

any help would be greatly appreciated  :)

thanks
Link to comment
Share on other sites

I think that what you would need to do is nothing to do with PHP but is to do with your POST you need to POST to the parent frame and then let that process and change the header location as using headers changes that single file e.g. inside the iframe instead of what you want which is the actual page the user see's

Maby there is some javascript you can use to do this if you ask in JS forum?

Liam
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.