I think you need to read a session document.
http://www.w3schools.com/php/php_sessions.asp http://www.tizag.com/phpT/phpsessions.php
In PHP, you need containers to send parameters to next pages.
So, you want to send "login_id" and "password" on 'POST' method to the next page, then do this.
session_start(); // Start Session. It's required.
$_SESSION['login_id'] = $_POST['login_id']; //Put 'login_id' text from the form into the session container
$_SESSION['password'] = $_POST['password']; //Put 'password' into the another container as the 'login_id'
Done!!!
The session will remember values in everywhere on your script.
Now, how to open the session variables
Any next pages.
session_start(); // Start Session. It's required.
$login_id = $_SESSION['login_id']; // indicate what 'login_id' value is
$password = $_SESSION['password']; // indicate what "password' value is
Done!!!
P.S: You do not need 2 pages to check the legal user. Try to use this way.
session_start();
if(isset($_POST['Submit']))
{
//check user here and if the user is legal
if(user is legal)
{
//if you still want to send user id to next page
$_SESSION['login_id'] = $_POST['login_id'];
$_SESSION['password'] = $_POST['password'];
// do whatever or go to next page
}
else
{
print "Sorry you are not legal user";
}
}
I hope this helps you.