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
To pass info via GET:
header('Location: otherScript.php?var1=val1&var2=val2');
Session:
// 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.