I currently have a login form and I want to pass the username across the URL. It is stored in a session variable.
I have this on the page after the login but it doesn't seem to be working.
$myusername = $_POST['myusername'];
I am looking for something like this:
page.php?myusername=example
The login page is a php page that connects to another php that checks the login details from mySQL database.
The main part from that is this (on the checklogin php page)
// username and password sent from form
$myusername=$_POST['myusername'];
$mypassword=$_POST['mypassword'];
On the following page, upon successful login I have this:
<?
session_start();
header( 'Location: menu.php?myusername=$myusername' ) ;
if(!session_is_registered(myusername)){
header("location:index.php");
}
?>