hi,
the layout of my site is. there are five files (4 are inside the includes folder):
index.php , header.php , pageniavigation.php , thumbnail.php , footer.php
the header file is where you select the number of images you want to be displayed per page.
the pagenavigation file contains the page links. ex: PREV, PAGE-1, PAGE-2, PAGE-3, NEXT
the thumbnail file contains the pictures
and of course the footer file for the footer
my question is how to write in php code the following:
1.) when i select 4 images to be displayed per page, the number of pictures displayed will be changed from 3 to 4.
-how do i do this?- -and on which file do i put the code into?-
2.) when i click the page 2 or page 3, it will go to the next corresponding set of images. it should also be the same for the PREV and NEXT clickable link.
-how do i do this?- -and on which file do i put the code into?-
here's my code:
index.php
<html>
<head>
<link rel="stylesheet" type="text/css" href="index.css" />
<title></title>
</head>
<body>
<?php
include("includes/header.php");
include("includes/pagenavigation.php");
include("includes/thumbnail.php");
include("includes/footer.php");
?>
</body>
</html>
here are the files inside the includes folder.
header.php
<html>
<head>
<title></title>
</head>
<body>
<div id="upperbox">
<b>Images Per Page</b>
<select id="set" name="pages">
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select>
<input name="new" type="submit" value="Set"/>
</div>
</body>
</html>
pagenavigation.php
<html>
<head>
<title></title>
</head>
<body>
<div><b><ul id="pagesbox">
<li><a href="#">Prev</a></li>
<li><a href="#">P-1</a></li>
<li><a href="#">P-2</a></li>
<li><a href="#">P-3</a></li>
<li><a href="#">Next</a></li>
<ul></b></div>
</body>
</html>
thumbnail.php
<html>
<head>
<title></title>
</head>
<body>
<div><b><ul id="images">
<li><img src="images/star-field.gif" id="pic"><p>This is pic 1</p></li>
<li><img src="images/ff7wallpaper3.jpg" id="pic"><p>This is pic 2</p></li>
<li><img src="images/ff7wallpaper3.jpg" id="pic"><p>This is pic 3</p></li>
<ul></b></div>
</body>
</html>
footer.php
<html>
<head>
<title></title>
</head>
<body>
<div><b>TESTING 1 2 3.</b></div>
</body>
</html>
I'm really confused on what to do & I hope someone can help me. Thanks! =)