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
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts

    Problem when loading image as images.php?id=gurusguru

    I'm trying to make a page which displays images, my code currently is:
    PHP Code:
    <?PHP

    switch ($_GET['id'])

    {

    case 
    'gurusguru';
    require (
    'gpop.gif');
    break;
    }

    default:
    echo (
    'Error');
    break;

    ?>
    and the page is located at http://www.mygpop.net/avatars/images.php?id=gurusguru

  • #2
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    This is a PHP question... I'm moving your thread...
    OracleGuy

  • #3
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    Quote Originally Posted by oracleguy
    This is a PHP question... I'm moving your thread...
    Wasn't sure if I should post it under the fact it may have something to do with MIME-types, so I posted it there, Sorry.

  • #4
    Regular Coder
    Join Date
    Jul 2002
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts
    not super good at php but I think you missing a ':' after case

  • #5
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    Quote Originally Posted by Garadon
    not super good at php but I think you missing a ':' after case
    Stupid shift, put ; not :, now let's see if it works...

    Still doesn't however, I had cleaned up another mistake I found, new code:
    PHP Code:
    <?PHP

    switch ($_GET['id'])

    {

    case 
    'gurusguru':
    require (
    'gpop.gif');
    break;

    default:
    echo (
    'Error');
    break;

    }

    ?>


  •  

    Posting Permissions

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