User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 363,558 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,885 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 2843 | Replies: 4
Reply
Join Date: Jan 2004
Location: Netherlands
Posts: 152
Reputation: floris has a spectacular aura about floris has a spectacular aura about 
Rep Power: 6
Solved Threads: 2
floris's Avatar
floris floris is offline Offline
vBulletin.com Staff

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

  #1  
Jan 21st, 2004
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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,869
Reputation: cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice 
Rep Power: 32
Solved Threads: 109
Admin
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

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

  #2  
Jan 21st, 2004
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 !
Reply With Quote  
Join Date: Jan 2004
Location: Netherlands
Posts: 152
Reputation: floris has a spectacular aura about floris has a spectacular aura about 
Rep Power: 6
Solved Threads: 2
floris's Avatar
floris floris is offline Offline
vBulletin.com Staff

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

  #3  
Jan 21st, 2004
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.
Reply With Quote  
Join Date: Feb 2002
Location: Long Island, NY
Posts: 1,134
Reputation: samaru is just really nice samaru is just really nice samaru is just really nice samaru is just really nice 
Rep Power: 12
Solved Threads: 2
Colleague
samaru's Avatar
samaru samaru is offline Offline
a.k.a inscissor

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

  #4  
Jan 21st, 2004
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?
_.:: my websites ::._
blog @ www.samaru.net * engi No Jutsu @ www.narutorp.net * portfolio @ shinylight.com
deviantART: inscissor
Reply With Quote  
Join Date: Nov 2003
Location: New Delhi, India
Posts: 95
Reputation: jayant will become famous soon enough jayant will become famous soon enough 
Rep Power: 6
Solved Threads: 1
jayant's Avatar
jayant jayant is offline Offline
Junior Poster in Training

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

  #5  
Jan 22nd, 2004
[php]<?php
header("Location: page.php?page=".($_GET['page']+1));
?>[/php]
Jayant Kumar Gandhi

My exams are over!!! I am back :)
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb PHP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 5:24 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC