PDA

View Full Version : help



ducktape
August 22nd, 2002, 16:12
i know this has been covered a million times and really recently. I wanna make an image gallery at http://kustomkar.com and i want links to the pics to be like http://kustomkar.com/gallery/index.php?page=1 something like that. now i wanna have the one page (index.php) as the template. i want it to be like if you click picture 1 then it just puts another small page with the image and a vote script. i have it all set up but how do i call the image and script into that spot on the index page, and actually set it up once and for get about it and add to it whenever i want. what would be best though is i want pages of like 12 pics so like

http://kustomkar.com/gallery/index.php?page=1&image=1
http://kustomkar.com/gallery/index.php?page=1&image=2

that would show the page 1 of the gallery not hte index and the pic. if you know what i mean

Nightfire
September 9th, 2002, 21:36
Add this in your index.php page



if ($page== ""){
include("includes/index_main.php");
}

elseif ($page == "1"){
include("includes/page1_main.php");
if ($image == "1"){
echo 'images/image1.jpg';
include("includes/vote.php");
}
elseif ($image == "2"){
echo 'images/image2.jpg';
include("includes/vote.php");
}
//etc etc
}

else {
include("includes/page2_main.php");
if ($image == "3"){
echo 'images/image3.jpg';
include("includes/vote.php");
}
elseif ($image == "4"){
echo 'images/image4.jpg';
include("includes/vote.php");
}
//etc etc
}


Not the best way to do it, but it's all I can be bothered to type out, I'm too tired.