Jump to content

[SOLVED] $_GET problem (2)


DEVILofDARKNESS

Recommended Posts

Hi,

 

I have made a page that uses an I-frame.

the main page is /gedichten/test/testgedicht.php?poem_id=1  for example

the I-frame is in /functieknoppen/functieknoppengedicht.php

 

I try to get the poem_id from the main page his url  to use it in that I-frame (with $_GET),

is that possible?

Link to comment
https://forums.phpfreaks.com/topic/146647-solved-_get-problem-2/
Share on other sites

Okay..

 

1) Main page is load with ?poem_id=123.

2) the Main page contains an Iframe..

 

So. instead of having

<iframe src="/functieknoppen/functieknoppengedicht.php">

to load up your iframe you do this

<iframe src="/functieknoppen/functieknoppengedicht.php?poem_id=<php echo $_GET['poem_id']; ?>"

thus passing poem_id from the main page to the iframe..

So in view source it will appear as

<iframe src="/functieknoppen/functieknoppengedicht.php?poem_id=123"

 

Now when functieknoppengedicht.php loads up it will be able to use $_GET['poem_id']..

 

Another option is always sessions!

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.