...

View Full Version : One webpage - Several menus.



effpeetee
05-28-2007, 09:36 PM
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

koyama
05-28-2007, 09:55 PM
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.

effpeetee
05-28-2007, 10:48 PM
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

vanilladesign
05-28-2007, 11:06 PM
You might want to try a pre-built image gallery script. For example TinyWebGallery (http://www.tinywebgallery.com/en/index.htm)

koyama
05-28-2007, 11:21 PM
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
$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.

effpeetee
05-29-2007, 12:13 AM
Thanks koyama,
Just off to bed.
Will look into it in the morning.

effpeetee

effpeetee
05-29-2007, 11:33 AM
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
$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.

koyama
05-31-2007, 02:58 PM
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

effpeetee
05-31-2007, 03:52 PM
Hmm... For me it is working:

http://www.exitfegs.co.uk/Picture.php?id=1
http://www.exitfegs.co.uk/Picture.php?id=2
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.


<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.

koyama
05-31-2007, 11:06 PM
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.

effpeetee
05-31-2007, 11:29 PM
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)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum