ohdang888 Posted March 23, 2008 Share Posted March 23, 2008 There is an html code in my database that i want to display... is it possible to make a thing like this: Display the code, where "PARAM NAME=movie VALUE=" is displayed, add "none.jpg" after the "Value=" ???? Thanks! EDIT: to answer a question that someone is likely to ask.... Theres all sorts of these code in my db, but They are all different, and only have "PARAM NAME=movie VALUE=" in common Link to comment https://forums.phpfreaks.com/topic/97526-is-this-possible/ Share on other sites More sharing options...
Bladescope Posted March 23, 2008 Share Posted March 23, 2008 say for example, if you have grabbed the code from the database and set it to a var ($var). so $var = "PARAM NAME=movie VALUE="; a matter of adding it to the string: $var = $var. 'none.jpg'; or $var2 = 'none.jpg'; $var = $var. $var2; Link to comment https://forums.phpfreaks.com/topic/97526-is-this-possible/#findComment-498994 Share on other sites More sharing options...
ohdang888 Posted March 23, 2008 Author Share Posted March 23, 2008 ok, i think i might need to explain what i'm doign a little more... I'm building a gaming site.... Its staying on localhost, its just learning project... but in my database, there are anout 20 rows of game info( 1 game per row) anyways... in one column, the script used to pull the game onto the page is stored. Then i withdraw that on the page. an example of 3 of those scripts is below... a few questions.... 1)Do the classid's of flash and shockwave games differ??? 1 <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="500" HEIGHT="545" id="2deep" ALIGN=""> <PARAM NAME=movie VALUE="gamefile/2deep.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=scale VALUE=noborder> <PARAM NAME=bgcolor VALUE=#1C1C77> <EMBED src="2deep.swf" quality=high scale=noborder bgcolor=#1C1C77 WIDTH="500" HEIGHT="545" NAME="2deep" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED> </OBJECT> 2 <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="600" height="430" id="3dsudoku" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="gamefile/3dsudoku.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#f8f9e4" /> <embed src="3dsudoku.swf" quality="high" bgcolor="#f8f9e4" width="600" height="430" name="3dsudoku" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> 3 <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="650" height="600"> <param name="movie" value="gamefile/yourface.swf"> <param name="quality" value="medium"> </object> 2) Which would be better? <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="<?php echo $width ?>" HEIGHT="<?php echo $height ?>" id="2deep" ALIGN=""> <PARAM NAME=movie VALUE="gamefile/<?php echo $game_name ?>"> <PARAM NAME=quality VALUE=high> <PARAM NAME=scale VALUE=noborder> <PARAM NAME=bgcolor VALUE=#1C1C77> <EMBED src="<?php echo $game_name ?>" quality=high scale=noborder bgcolor=#1C1C77 WIDTH="<?php echo $width ?>" HEIGHT="<?php echo $height ?>" NAME="2deep" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED> </OBJECT> Or Keep the code in the databse, and look for something in the middle of the code and add it when displayed? Thanks! Link to comment https://forums.phpfreaks.com/topic/97526-is-this-possible/#findComment-499005 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.