Page 1 of 1
Help with alias script
Posted: Wed Jul 02, 2008 4:28 pm
by JKM
Hi there!
Could anyone help me out with a alias script?
"alias page2 -> should show start=50"
"alias page3 -> should show start=75"
"alias page4 -> should show start=100"
and so on.

Re: Help with alias script
Posted: Wed Jul 02, 2008 4:32 pm
by John Cartwright
What is an alias script? Can you explain what you are after more please?
Re: Help with alias script
Posted: Thu Jul 03, 2008 6:22 am
by JKM
It's used in mirc scripting (f.i. alias q { quit }). I've got a dvd database, where it's start=25/start=50 and so on. But I wan't to make it look a little better. So dvddb.php?order=rating&page=2 (should actually show dvddb.php?order=rating&start=50).
Re: Help with alias script
Posted: Thu Jul 03, 2008 3:07 pm
by John Cartwright
Code: Select all
$page = isset($_GET['page']) ? intval($_GET['page']) : 1;
if (!$start) {
$page = 1;
}
$start = $page * 25;
So all you want to do is multiply the page number by 25?
Re: Help with alias script
Posted: Sat Jul 05, 2008 4:51 am
by JKM
Yes - thx!
