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 11 of 11
  1. #1
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts

    Exclamation One webpage - Several menus.

    Hello friends,

    I have a family website with over 100 jpegs for the visitors to see.
    The first use is on entry to the index page where the picture presented remains for 45 seconds before being changed. During this period, clicking on the presented picture will bring up a full page version which will stay until clicked. Then it returns to the index page as the hyperlink is so set.

    I also have a picture menu which can be selected from the index page and the same thing happens, a large picture is presented until clicked. This returns one to the picture menu as the hyperlink is so set.

    This has meant that each page has had to be duplicated under different names. I have used the same name plus a suffix.

    Now I want to do the same thing using another menu, which on the face of it, means yet a third copy of the relevent pages under yet another name.

    NOW I COME TO THE POINT. Is there another, more elegant way of doing this.
    I already have over two hundred pages on my site.

    HELP!!!

    www.exitfegs.co.uk

    Just in case you want to try it.

    effpeetee

  • #2
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by effpeetee View Post
    Is there another, more elegant way of doing this. I already have over two hundred pages on my site.
    I would look into server-side scripting like PHP. You'll have to check with your host whether it is supported or not. It's quite likely that you have such support.

  • #3
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    Quote Originally Posted by koyama View Post
    I would look into server-side scripting like PHP. You'll have to check with your host whether it is supported or not. It's quite likely that you have such support.
    Hello koyama,

    My host does have PHP4 scripting support. But I do not have any knowledge of PHP scripting. For now I will probably just have to rely on duplicate pages

    Many thanks for your input .

    effpeetee

  • #4
    New Coder
    Join Date
    May 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You might want to try a pre-built image gallery script. For example TinyWebGallery

  • #5
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by effpeetee View Post
    My host does have PHP4 scripting support. But I do not have any knowledge of PHP scripting. For now I will probably just have to rely on duplicate pages
    PHP is really quite straightforward. To get started, try to save this file as picture.php and upload it to your web server at this location:

    http://www.exitfegs.co.uk/picture.php
    PHP Code:
    <?php
    $id 
    $_GET['id'];
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
    <html>
    <head>
    <title>This is picture number <?php echo $id?></title>
    </head>
    <body>
    <div>
    <h1>This is picture number <?php echo $id?></h1>
    <img src="<?php echo $id?>.jpg" alt="">
    </div>
    </body>
    </html>
    After doing that, try to navigate to pages like these:

    http://www.exitfegs.co.uk/picture.php?id=1
    http://www.exitfegs.co.uk/picture.php?id=2
    ...

    I know this is a simple and incomplete example, but it may show you the potential of PHP.

  • #6
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    Thanks koyama,
    Just off to bed.
    Will look into it in the morning.

    effpeetee

  • #7
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    Quote Originally Posted by koyama View Post
    PHP is really quite straightforward. To get started, try to save this file as picture.php and upload it to your web server at this location:

    http://www.exitfegs.co.uk/picture.php
    PHP Code:
    <?php
    $id 
    $_GET['id'];
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
    <html>
    <head>
    <title>This is picture number <?php echo $id?></title>
    </head>
    <body>
    <div>
    <h1>This is picture number <?php echo $id?></h1>
    <img src="<?php echo $id?>.jpg" alt="">
    </div>
    </body>
    </html>
    After doing that, try to navigate to pages like these:

    http://www.exitfegs.co.uk/picture.php?id=1
    http://www.exitfegs.co.uk/picture.php?id=2
    ...

    I know this is a simple and incomplete example, but it may show you the potential of PHP.
    Hi koyama,

    I have done the above but I get nothing back from the server. just 404.

    Perhaps I am using it incorrectly. I just pasted the url you supplied.

    Any further suggestions welcomed. Picture.php is on the site.

    effpeetee.

  • #8
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by effpeetee View Post
    I have done the above but I get nothing back from the server. just 404.

    Perhaps I am using it incorrectly. I just pasted the url you supplied.
    Hmm... For me it is working:

    http://www.exitfegs.co.uk/Picture.php?id=1
    http://www.exitfegs.co.uk/Picture.php?id=2

  • #9
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    Quote Originally Posted by koyama View Post
    Hello koyama.

    Yes! I have just tried it and it worked for me. Perhaps I needed to wait for them to link me to the PHP.
    I did contact the Provider to complain, but they didn't want to know.

    Programming and scripting is my problem, they said.
    Not very helpful. Thank you for your continued interest. I'll go into it further.



    I uploaded the 'Hello.php' also but I still cannot get a response from that, It is supposed to echo Hello back to me.

    Code:
    <html>
     <head>
      <title>PHP Test</title>
     </head>
     <body>
     <?php echo '<p>Hello World</p>'; ?> 
     </body>
    </html>
    I got this fromm a PHP tutorial.

    saved as hello.php

    effpeetee.
    Last edited by effpeetee; 05-31-2007 at 03:07 PM. Reason: Added info and code

  • #10
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by effpeetee View Post
    I uploaded the 'Hello.php' also but I still cannot get a response from that, It is supposed to echo Hello back to me.
    [...]
    saved as hello.php
    It seems that you are unaware that filenames are case sensitive. Hello.php is not the same as hello.php. The PHP server seems to be functioning correctly.

  • #11
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    Quote Originally Posted by koyama View Post
    It seems that you are unaware that filenames are case sensitive. Hello.php is not the same as hello.php. The PHP server seems to be functioning correctly.
    Hello Koyama

    Fancy me not thinking of that. I am busy reading "CSS The Missing Manual" and my brain is awash with new data.

    I obviously need a good night's sleep. Many thanks for straightening me out.

    I'll get there eventually.

    Frank (effpeetee)


  •  

    Posting Permissions

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