Page 1 of 1
Help with an include script (&pageX)
Posted: Tue Jun 17, 2008 8:16 pm
by JKM
Hi there!
I'm lookin' for a PHP include script that shows pageX with &pageX. I've got a sucky script for it, but I have to write &page=X, and it includes both p=index and page=X. So if you guys could help me out here, I would be greatfull.
JKM.
Re: Help with an include script (&pageX)
Posted: Tue Jun 17, 2008 8:30 pm
by John Cartwright
Your going to have to explain a bit better. I really didn't get much of your explanation.

Re: Help with an include script (&pageX)
Posted: Wed Jun 18, 2008 7:44 am
by JKM
Hmm. I wan't a script where I can show pages like this:
images.php?gallery=Toronto -----> Should show Toronto.php
images.php?gallery=Toronto&page2 ------> Should show Toronto_page2.php
images.php?gallery=Australia&page3 ------> Should show Australia_page3.php
and so on..
Re: Help with an include script (&pageX)
Posted: Wed Jun 18, 2008 7:53 am
by ragnis12
Code: Select all
<?php
if($_GET['gallery']){
$page = (isset($_GET['page'])) ? '_'.$_GET['page'] : '';
if(file_exists($_GET['gallery'].$page.'.php')){
include $_GET['gallery'].$page.'.php';
}else{
echo 'File not found';
}
}
?>
if you write index.php?gallery=toronto tehn will be included toronto.php
if you write index.php?gallery=toronto&page=2 then will be included toronto_2.php
if you write index.php?gallery=toronto&page=page2 then will be included toronto_page2.php
I hope you understand.
Re: Help with an include script (&pageX)
Posted: Wed Jun 18, 2008 9:15 am
by JKM
Thx alot, but isn't it possible to get &page2, not &page=page2?

Re: Help with an include script (&pageX)
Posted: Wed Jun 18, 2008 10:26 am
by ragnis12
no, it's not possible
Re: Help with an include script (&pageX)
Posted: Wed Jun 18, 2008 1:42 pm
by Greenconure
JKM wrote:Thx alot, but isn't it possible to get &page2, not &page=page2?

You could; however, use
"&page=2"
Re: Help with an include script (&pageX)
Posted: Fri Jun 27, 2008 4:06 pm
by JKM
How can I make it work like this:
?gallery=toronto&order=taken
order=added should have the value "$result = mysql_query("SELECT * FROM gallery ORDER BY LCASE(added) ASC, added DESC");"
order=size should have the value "$result = mysql_query("SELECT * FROM gallery ORDER BY LCASE(size) ASC, sizeDESC");"
and so on..