Elorensun Posted March 22, 2006 Share Posted March 22, 2006 Hi ... I got a question ... can I insert a variable with a objectfirst this is my code[code]<object type="application/x-shockwave-flash" width="400" height="220" wmode="transparent data="video/flvplayer.swf?file=video.flv" <param name="movie" value="video/flvplayer.swf?file=video.flv" /> <param name="wmode" value="transparent" /> </object>[/code]I want to change video.flv by a variable that I put in my url link...exemple ?vids=videoI tried a code I got from the forum but did not work... got any suggestion? Quote Link to comment https://forums.phpfreaks.com/topic/5472-variable/ Share on other sites More sharing options...
wisewood Posted March 22, 2006 Share Posted March 22, 2006 your_page.php?var=something$variable = $_GET['var'];$variable will now be "something"You can then use <?=$variable?> to insert it into your html object or whatever. Quote Link to comment https://forums.phpfreaks.com/topic/5472-variable/#findComment-19610 Share on other sites More sharing options...
redbullmarky Posted March 22, 2006 Share Posted March 22, 2006 [!--quoteo(post=357246:date=Mar 22 2006, 11:19 AM:name=wisewood)--][div class=\'quotetop\']QUOTE(wisewood @ Mar 22 2006, 11:19 AM) [snapback]357246[/snapback][/div][div class=\'quotemain\'][!--quotec--]your_page.php?var=something$variable = $_GET['var'];$variable will now be "something"You can then use <?=$variable?> to insert it into your html object or whatever.[/quote]yep. just to elaborate on that incase youre not sure, you need to put php into your code:[code]<?php$vid = $_GET['vids'];?><object type="application/x-shockwave-flash" width="400" height="220" wmode="transparent data="video/flvplayer.swf?file=<?php echo $vid; ?>" <param name="movie" value="video/flvplayer.swf?file=<?php echo $vid; ?>" /> <param name="wmode" value="transparent" /> </object>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/5472-variable/#findComment-19667 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.