|
-
Mar 29th, 2007, 05:58 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] Header
Hello all
php Code:
header("location: index.php");
Thats the code im using, its coming from my login.php page.
However when i moves accross to the new php script, the url stays the same, how do i get it to change the url name aswell.
ILMV2
-
Mar 29th, 2007, 06:00 AM
#2
Thread Starter
Frenzied Member
Re: Header
Not to worry, forgot the exit; after it.
How do i rep myself?
-
Mar 29th, 2007, 06:01 AM
#3
Re: [RESOLVED] Header
The Location header must be an absolute URI. For example:
PHP Code:
<?php header("Location: http://{$_SERVER['HTTP_HOST']}/index.php"); ?>
-
Mar 29th, 2007, 07:13 AM
#4
Thread Starter
Frenzied Member
Re: [RESOLVED] Header
If its within the same directory you can still use the good old ./index.php
After putting exit; it prevented any more code from the ./login.php page and therefore took the url name of the new page.
-
Mar 29th, 2007, 07:16 AM
#5
-
Mar 29th, 2007, 09:56 AM
#6
Thread Starter
Frenzied Member
Re: [RESOLVED] Header
Ill bear that in mind, thanks dude
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|