RE: [PHP] Re: header('Location:') works locally but not remotely
| From: | Tim | Date: | Mon, 16 Apr 2007 17:53:47 +0000 |
| Subject: | RE: [PHP] Re: header('Location:') works locally but not remotely | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-253041@lists.php.net to get a copy of this message | ||
> -----Message d'origine-----
> De : Ross [mailto:ross@aztechost.com]
> Envoyé : lundi 16 avril 2007 19:45
> À : php-general@lists.php.net
> Objet : [PHP] Re: header('Location:') works locally but not remotely
>
> ok I have a page that calls my my functions, basically a 6
> step signup. All the steps look like this
>
> function step_one() {
>
> $_SESSION['property_id'] =$_POST['property_id']; $property_id
> = $_POST['property_id']; $postcode= $_POST['postcode'];
> $query = "INSERT INTO properties (property_id, postcode)
> VALUES ('$property_id', '$postcode')"; $result=
> mysql_query($query); header( 'Location: ?step=two' ); }
<php.net>
http://fr.php.net/header:
Note: HTTP/1.1 requires an absolute URI as argument to » Location:
including the scheme, hostname and absolute path, but some clients accept
relative URIs. You can usually use $_SERVER['HTTP_HOST'],
$_SERVER['PHP_SELF'] and dirname() to make an absolute URI from a relative
one yourself
</php.net>
Could this be your issue? I always use full URI for "header('location:"
Regards,
Tim