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.
Help with an include script (&pageX)
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Help with an include script (&pageX)
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)
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..
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)
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&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)
Thx alot, but isn't it possible to get &page2, not &page=page2? 
Re: Help with an include script (&pageX)
no, it's not possible
- Greenconure
- Forum Commoner
- Posts: 30
- Joined: Mon Jun 16, 2008 8:19 am
Re: Help with an include script (&pageX)
You could; however, use "&page=2"JKM wrote:Thx alot, but isn't it possible to get &page2, not &page=page2?
Re: Help with an include script (&pageX)
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..
?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..