Jump to content

Tricky variable issue


trickyone

Recommended Posts

Hi,

 

I need to know if php can handle passing variables to another php file without having to go to that page.

 

The issue is, i have a flash player using a playlist which should be rendered in another file called playlist.php.

 

The php file having the embedded player is dynamic and uses IDs like lets say:

 

channel.php?cid=24

 

my playlist.php needs to be aware of this "cid" variable so that it can render the appropriate playlist.

 

When i use the file flashvar as playlist.php?cid=[var.channel_id] and try to collect it with GET method in the playlist.php, it returns a playlist with undefined items.

 

I think this is because playlist.php is inactive when myurl/channel?cid=24 is loaded. I need to post this channel id to playlist.php onload without being redirected.

 

Is this possible?

 

Appreciate any idea, thanks

Link to comment
https://forums.phpfreaks.com/topic/89810-tricky-variable-issue/
Share on other sites

Isn't there a simple solution cause if i can pass this variable to the playlist.php everything will be working ok.

 

I tried a hidden form and used a simple javascript onload submit method. This caused the correct playlist to be rendered but i've been redirected to that rendered xml.

 

I know it can be done with ajax but i do not understand ajax at all.

Link to comment
https://forums.phpfreaks.com/topic/89810-tricky-variable-issue/#findComment-460224
Share on other sites

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.