Jump to content

header() -- limits?


Kelvie

Recommended Posts

rpg.php and index.php are in the same directory folder.

 

I know for sure the ehader actually runs.

 

What happens is it goes from 'rpg.php?RPG=overview' to 'rpg.php' instead of changing header to 'index.php'.  Basically removing the variables and refreshing the page..

 

the exact script used for header is:  header("Location: index.php");   Now before you say ' its cause the path isnt right' well wouldn't that still change the webpage but just say Page cannont be Displayed?

 

Note 2 things about my script.  1, the page is decided by rpg.php, in its script, and the page decided by rpg.php is included in the script. eg, include("filename").  I'm trying to convert my site from using meta-equiv to change the URL to using header().

 

Hope this helps in understanding my problem.

 

One more thing, since meta-equiv is used perhaps because its sending an additional header its causing an issue?

 

 

--MORE -----------------------

 

http://rpg.root51.com/index.php  <--- see for yourself there.  It's in absolute alpha stage so its completely sucky, it's more of 'testing' before I continue with my actual game.  Anyway register up, and then login and then logout.  The logout button runs the condition to use the header() function.

 

-----------------------------

 

An exact copy of rpg.php

 

----

<?php
@include("session.php");
if(empty($_SESSION[*removed*])){
echo "Not logged in; redirecting..";
echo '<meta http-equiv="refresh" content="0;URL=index.php" />';
die();
}
switch($_GET[RPG]){
	case 'ranks':
		@include("./pages/ranks.php");
	break;
	case 'profile':
		@include("./pages/profile.php");
	break;
	case 'overview':
		@include("./pages/overview.php");
	break;
	case 'mail':
		@include("./pages/mail.php");
	break;
	case 'inbox':
		@include("./pages/inbox.php");
	break;
	case 'sendmail':
		@include("./pages/write.php");
	break;
	case 'viewmail':
		@include("./pages/viewmail.php");
	break;
	default:
		@include("./pages/overview.php");
	break;
}
?>

 

Thanks

 

-Aaron

Link to comment
https://forums.phpfreaks.com/topic/68988-header-limits/#findComment-346964
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.