Jump to content

how to pass variable in frames?


skeener

Recommended Posts

hi there,

 

i know how to pass a value to another page, but i can't pass a value to a php page which is in a htm  frameset.

 

http://localhost/food_type/myindex.htm?foodNo=54

 

the php page that suppose to use the $_GET function is eat.php , but that page is residing in myindex.htm .

 

I can pass the value successfully if the url is : http://localhost/food_type/eat.php?foodNo=54

 

How can i pass the value if it is in a frameset.

please help

thx in advance

Link to comment
https://forums.phpfreaks.com/topic/37269-how-to-pass-variable-in-frames/
Share on other sites

You can pass the value directly to eat.php (inside the frameset) by setting the target frame name in your link. Name the frame in the frameset something like this:

 

<frame name="eatframe" src="eat.php">

 

then set the target in your link like this:

 

<a href="eat.php?foodNo=54" target="eatframe">Food number 54</a>

 

and eat.php in your frameset should get the value...

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.