DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   PHP (http://www.daniweb.com/forums/forum17.html)
-   -   page.php?page=1,2,3,4,..inf. (http://www.daniweb.com/forums/thread2685.html)

floris Jan 21st, 2004 3:18 am
page.php?page=1,2,3,4,..inf.
 
I know how to catch an action from someone entering page.php and then set a default to page=1 and have the action for page=1 to load page=2, but how should I make page.php to catch 1,2,3,4,5,infinity so it keeps loading until the user closes the browser?


reloading can be done using
header("Location: page.php?page=n");
(where n = number)

catching empty action can be done like this
if (!isset($action) or $action=="") {
$action="page1";
}

catching page =1 can be done like this
if ($action=="page1") {
header("Location: page.php?page=2");
}

etc.

cscgal Jan 21st, 2004 3:21 am
Re: page.php?page=1,2,3,4,..inf.
 
I'm confused what this does ... it keeps redirecting to page 1 and then page 2 and then page 3 ... never stopping in between? I'm lost how this would be useful. Sorry floris but it's 3:30 am here ;) !

floris Jan 21st, 2004 3:49 am
Re: page.php?page=1,2,3,4,..inf.
 
Quote:

Originally Posted by cscgal
I'm confused what this does ... it keeps redirecting to page 1 and then page 2 and then page 3 ... never stopping in between? I'm lost how this would be useful. Sorry floris but it's 3:30 am here ;) !

We will put additional code and information in at random, pulled from a function.

samaru Jan 21st, 2004 3:49 pm
Re: page.php?page=1,2,3,4,..inf.
 
What do you mean by "catching an action"? Is "action" a URL variable passed to a script? Do you want to reload/refresh the page according to an integer value of a URL variable?

jayant Jan 22nd, 2004 12:52 pm
Re: page.php?page=1,2,3,4,..inf.
 
[php]<?php
header("Location: page.php?page=".($_GET['page']+1));
?>[/php]


All times are GMT -4. The time now is 11:23 pm.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC