943,844 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 4404
  • PHP RSS
Jan 21st, 2004
0

page.php?page=1,2,3,4,..inf.

Expand Post »
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.
Similar Threads
Reputation Points: 115
Solved Threads: 2
Junior Poster
floris is offline Offline
152 posts
since Jan 2004
Jan 21st, 2004
0

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 !
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
Jan 21st, 2004
0

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.
Reputation Points: 115
Solved Threads: 2
Junior Poster
floris is offline Offline
152 posts
since Jan 2004
Jan 21st, 2004
0

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?
Team Colleague
Reputation Points: 262
Solved Threads: 18
a.k.a inscissor
samaru is offline Offline
1,227 posts
since Feb 2002
Jan 22nd, 2004
0

Re: page.php?page=1,2,3,4,..inf.

[php]<?php
header("Location: page.php?page=".($_GET['page']+1));
?>[/php]
Reputation Points: 46
Solved Threads: 1
Junior Poster in Training
jayant is offline Offline
95 posts
since Nov 2003

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Features in PHP 5
Next Thread in PHP Forum Timeline: PHP Cookbook





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC