trickyone Posted February 6, 2008 Share Posted February 6, 2008 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 More sharing options...
Stooney Posted February 6, 2008 Share Posted February 6, 2008 I'm not all that familiar with flash, but you might look into AJAX. http://marc.info/?l=php-general&m=112198633625636&w=2 Link to comment https://forums.phpfreaks.com/topic/89810-tricky-variable-issue/#findComment-460208 Share on other sites More sharing options...
mem0ri Posted February 6, 2008 Share Posted February 6, 2008 You're definitely going to want to use AJAX / XML importing. You may want to research FLEX and MXML (Adobe's solution for passing information to and from Flash). Link to comment https://forums.phpfreaks.com/topic/89810-tricky-variable-issue/#findComment-460211 Share on other sites More sharing options...
trickyone Posted February 6, 2008 Author Share Posted February 6, 2008 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 More sharing options...
Stooney Posted February 6, 2008 Share Posted February 6, 2008 With the link I linked in my previous post you can understand it in less than an hour. It's not as difficult as it seems, I promise. Link to comment https://forums.phpfreaks.com/topic/89810-tricky-variable-issue/#findComment-460253 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.