Maybe I’m going about this the wrong way, but I’ll lay out the process I’d like my website to perform and then see what solutions you guys can think of.
At the URL
example.net/ShellySite/Form/form.php
There is a form to be filled out, then a submit button is pressed, and the website goes to
example.net/ShellySite/Controller/PHP/submitform.php
It goes here because it submits the details in the form to a database, what I’d like to do is basically instantly reroute the browser to a different page after the code at the submitform.php page has finished running, something like
example.net/ShellySite/Home/home.php
But I can’t seem to get it to work. I’ve tried stuff like header(Location:"example.net/ShellySite/Home/home.php")
but it just appends all that onto the end of example.net/ShellySite/Controller/PHP/submitform.php, and that obviously isn’t what I want.
Any help would be great!
Use absolute URLs: