Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Feb 2006
    Posts
    149
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    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!
    Last edited by Al Capone; 02-13-2006 at 03:19 AM.

  • #2
    Regular Coder Element's Avatar
    Join Date
    Jul 2004
    Location
    Lynnwood, Washington, US
    Posts
    855
    Thanks
    2
    Thanked 2 Times in 2 Posts
    you must wrap all PHP in the PHP tags, so any if statements, etc.

  • #3
    Regular Coder
    Join Date
    Feb 2006
    Posts
    149
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    Last edited by Al Capone; 02-13-2006 at 03:19 AM.

  • #4
    Regular Coder
    Join Date
    Oct 2004
    Posts
    360
    Thanks
    0
    Thanked 17 Times in 17 Posts
    Try this:
    PHP Code:
    <?php

    if(strstr($file,'.swf'))
        {

    ?>
    <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>
    </P>
    </center>

    <?php

        
    }
    elseif(
    strstr($file,'.nes'))
        {

    ?>

    <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>
    <?php
    }
    ?>

  • #5
    Regular Coder
    Join Date
    Feb 2006
    Posts
    149
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

    [QUOTE
    Anyone know what that means? Thanks in advance
    Last edited by Al Capone; 02-13-2006 at 03:20 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •