View Full Version : Where should I rap <?php ?> so this works (EASY, I AM NEWB)

Al Capone
02-12-2006, 10:10 PM
Hello, and good afternoon :)

Ok, right now, I am using this code:

i remove this

I am getting this: site not done I want to have it so that only one game shows, for some reason the code in red does't work, I think it has something to do with the <?php ?>

Could someone tell me where the <?php ?> should go so the code in red works? Thanks in advance!

02-12-2006, 11:12 PM
you must wrap all PHP in the PHP tags, so any if statements, etc.

Al Capone
02-12-2006, 11:53 PM
Thanks for the quick reply :)

I tried this:

<?php if (strstr($file, ".swf")) {

} ?>

but I still have the same problem, could you look at this link http://www.ewobble.com/game3.php?gameid=57 and tell me where to place the <?php ?>, ive been trying for about 2 days now guessing in every spot, i am new to php so it would help a lot if you could tell me where to place the <?php ?>, thanks in advance :)

02-13-2006, 12:33 AM
Try this:



<param name="movie" value="swf/<?php echo $row['file']; ?>" />
<param name="quality" value="high" />
<embed src="swf/<?php echo $row['file']; ?>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="<?php echo $defaultwidth; ?>" height="<?php echo $defaultheight; ?>"></embed>




<applet code="NESCafeApplet" archive="nescafe.jar" codebase="." ROMFILE="/swf/<?php echo $row['file'];?>" width="390" height="366" name="nescafe">

<param ...the rest of your HTML here... /center>

Al Capone
02-13-2006, 01:03 AM
Thanks for the reply :)

Ok, I got an error,

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/pgn/public_html/game3.php on line 73

I will make line 73 RED

Anyone know what that means? Thanks in advance :)