Reputation: 3
I'm making a login system in PHP. I have three files, login.php, check.php and login_success.php.
In the login.php I have the login form where you enter a username and password then hit a button which will send the data to check.php with $_POST to see if the login matches with the database. If it does, it will continue on to login_success.php where the user is actually logged in and will see the content of the webpage.
Now to my problem/question: I want to be able to use the variables that I posted to check.php from login.php in the login_success.php.
Is there a way I can keep posting the data through one file to a third?
I have tried using include = 'check.php'; but that didn't work as nothing had been sent to that file so the variables were empty.
Hopefully someone knows a way, thanks!
Upvotes: 0
Views: 64