Go Back   HTMLCenter Web Development Forums > Web Design and Development > Programming and Scripting

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 07-17-2008, 12:22 PM
Registered User
 
Join Date: Jul 2004
Posts: 224
redirecting page

My intention for redirecting is to insert data within an online server. Because if the time exceeds 60 seconds everything comes to a pause.

So instead I decided to add an extension ?page=1 and make the page redirect to ?page=2 and so on.

And as I test it the very first page it's doing it's job: inserting to the db table. But the next pages directed is not doing at all because it's going too fast.

I've set the redirecting $time at 480 seconds. But I don't think it's obeying.
PHP Code:
<?php
$time 
set_time_limit(480);
/*
$totalPages=722;
$url_page= $_GET['page'];
$num_pages = 100;
for($thisPage = 1; $thisPage <= $totalPages; $thisPage = $thisPage+$num_pages ){
    $startpage = $thisPage;
}
*/
$num_pages 100;
$totalPages=722;
$end_url_pageceil($totalPages/$num_pages);
if (!isset(
$_GET["page"])) {
  
$url_page 1;
} else {
  
$url_page $_GET["page"];
}
//$startpage = (($url_page - 1 ) * $num_pages) + 1;
$startpage = (isset($_GET['page'])) ? (((int) $_GET['page']) - 1) * $num_pages 1;
$booklink "be_wise_as_serpents";
$acronym "bwas2";
$bookTitle "Be Wise As Serpents";
$link 'www.iusedtoloveher.com/img/other';
if (!isset(
$_GET["page"])) {
    
$next_url_page 2;
}else{
    
$next_url_page $url_page 1;
}
$goto "insertindb.php?page=".$next_url_page;
$gotoIndex "index.php?page_num=1";
$totaldivs 59;
include(
"files/dbconnection.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?
if($url_page<$end_url_page){
    echo 
"<meta http-equiv='Refresh' content='".$time."; url=".$goto."' />";
}else{
    echo 
"<meta http-equiv='Refresh' content='".$time."; url=".$gotoIndex."' />";
}
//echo $time;
?>
Reply With Quote

Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP linking to bottom of page.. yuppicide Programming and Scripting 5 02-20-2008 03:28 PM
Display Value (ie 28.3) dynamically in web page Bad Inferno Graphics and Flash 0 07-01-2007 05:03 AM
javascript for redirecting iFrame page gilgalbiblewhee Programming and Scripting 0 08-29-2006 01:36 PM
go to next page function ruthann Programming and Scripting 1 08-16-2006 07:02 AM
"session validation checking" in html page ...HELP dragon Programming and Scripting 4 08-15-2006 01:06 PM


All times are GMT -5. The time now is 11:05 PM.

 
KickApps
Clicky Web Analytics


Subscribe to our feed | add to myYahoo!

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
© 1997-2007 HTMLCenter