Send post through two files

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!


if you want that Post data from login page to the login_success.php page then you must store that post data to the $_SESSION variable then only you will get it on the login success page.

Need Your Help

Error Generating T4 on Build using VS 2015

visual-studio-2015 template-engine t4

I'm using Visual Studio 2015 update 3. I tried using TextTransform.exe with the dp flag, but I got this error :

Finding the point on a simplex closest to the origin using GJK's distance subalgorithm

algorithm collision-detection computational-geometry

I'm trying to implement the Gilbert–Johnson–Keerthi distance algorithm (GJK), but I'm having problems with the "distance subalgorithm", also known as "Johnson's Algorithm", which is used to determi...