Jump to content

Header Function Redirects to Wrong Path


Glese

Recommended Posts

        header('Location: ' . $register_success);

 

    $register_success = 'register_success.php';

 

The header function above gets executed after a successful registering, and the variable is stated in the path.php file, which gets included into the header.php file, which also is included into the page, and also into the page with the register form.

 

The register form is contained in the path model/register/register_script.php, and the file register_success.php is in the same folder. The problem I am having is that the header function does redirect to controller/register/register_success.php this used to be the previous location of that file.

 

I am wondering is the old path saved somewhere in the cache, and this all is actually a caching problem? It does not seem to be a caching problem of the internet browser because I cleaned the cache out.

 

What else could be the cause for this problem? If it is a caching problem, which cache could be, as in in which location?

Link to comment
Share on other sites

So what would be your recommendation when working on a localhost server and then uploading the project to a public server?

 

I do have my own system working with paths, but I think it still can be better, but I also know the possibilities are limited, and PHP does not have a specific path system.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.