hi, I'm just getting started here in php, but i've been able to get some
basic variable stuff working, so I'm just looking for advice on the basic
set up of some thumbnail->picture pages. the thumbnail page will send the
variable $picname to the picturepage.php .
I'm thinking, picturepage.php would look like this:
<?
if($picname == "birds"){
$picture = "birds.jpg" ;
$pagetitle = "Here are Some Birds";
$prev = "thePreviouspag e.htm";
$next = "theNextpage.ht m";
$descrip = "<h1>Birds/<H1>
this is some text describing the picture,
it could be a lengthy paragraph with html formatting,
maybe even a table with a little chart or something";
}
if($picname == "dogs"){
$picture = "dogs.jpg";
$pagetitle = "Here are Some Dogs";
// if if if, lotsa ifs
// etc etc, blah blah
// could be 20 or more pictures, could be lots more
// how much is too much?
}
?>
<HTML>
<title> <?php echo($pagetitle ) ?> </title>
<body>Welcome to my Picture page<br>
here is the picture:
<img src="<?php echo($picture) ?>" >
here is where it was taken: <?php echo($descrip) ?>
<etc, etc>
I was wondering if this would be too long of a .php page, what with all the
variables, description paragraph, etc. Or does that matter much? is it
better to use an include? or an array? like, I could put the description
paragraphs in separate txt files and include them?
there's lots and lots of pictures, with lots of if()'s? possibly with long
paragraphs of description? I guess the user only loads the actual outputted
html, so, it wouldn't be a big thing. So, if the server is able to do its
thing in a timely manner its ok?
--
thanks for your time,
juglesh B>{)}
basic variable stuff working, so I'm just looking for advice on the basic
set up of some thumbnail->picture pages. the thumbnail page will send the
variable $picname to the picturepage.php .
I'm thinking, picturepage.php would look like this:
<?
if($picname == "birds"){
$picture = "birds.jpg" ;
$pagetitle = "Here are Some Birds";
$prev = "thePreviouspag e.htm";
$next = "theNextpage.ht m";
$descrip = "<h1>Birds/<H1>
this is some text describing the picture,
it could be a lengthy paragraph with html formatting,
maybe even a table with a little chart or something";
}
if($picname == "dogs"){
$picture = "dogs.jpg";
$pagetitle = "Here are Some Dogs";
// if if if, lotsa ifs
// etc etc, blah blah
// could be 20 or more pictures, could be lots more
// how much is too much?
}
?>
<HTML>
<title> <?php echo($pagetitle ) ?> </title>
<body>Welcome to my Picture page<br>
here is the picture:
<img src="<?php echo($picture) ?>" >
here is where it was taken: <?php echo($descrip) ?>
<etc, etc>
I was wondering if this would be too long of a .php page, what with all the
variables, description paragraph, etc. Or does that matter much? is it
better to use an include? or an array? like, I could put the description
paragraphs in separate txt files and include them?
there's lots and lots of pictures, with lots of if()'s? possibly with long
paragraphs of description? I guess the user only loads the actual outputted
html, so, it wouldn't be a big thing. So, if the server is able to do its
thing in a timely manner its ok?
--
thanks for your time,
juglesh B>{)}
Comment