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
https://forums.phpfreaks.com/topic/254258-header-function-redirects-to-wrong-path/
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.

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.