Is there any way to pass values and variables between php scripts?
Formally, I tried to code a login page and when user enter wrong input first another script will check the input and if it is wrong, site returns to the last script page and show a warning like "It is wrong input". For this aim, I need to pass values from scripts I guess.
To pass info via GET:
// first script session_start(); $_SESSION['varName'] = 'varVal'; header('Location: second_script.php'); // go to other // second script session_start(); $myVar = $_SESSION['varName'];
Post: Take a look at this.