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
Printable View
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
Not to worry, forgot the exit; after it.
How do i rep myself?
The Location header must be an absolute URI. For example:
PHP Code:<?php header("Location: http://{$_SERVER['HTTP_HOST']}/index.php"); ?>
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.
Yes, you can do it, but you're not supposed to:
http://www.w3.org/Protocols/rfc2616/....html#sec14.30
Ill bear that in mind, thanks dude :thumb: