I have this
session_start();
if ($_SESSION['email']&&$_SESSION['companyID'])
echo $_SESSION['email']."";
else
die("You must be logged in!");
and now im saving some data in database, and i want to save the companyID aswell by using createUser.php which contain these but its not saving the companyID
$userID=0;
$userRole=$_POST ["role"];
$userEmail = $_POST["userEmail"];
$userPassword = $_POST["userPassword"];
$companyID = $_POST[$_SESSION["companyID"]];
// insertion to user_details table
$sql = "INSERT INTO users (userID, email, password,companyID,roleID) VALUES
('$userID', '$userEmail', '$userPassword','$companyID','$userRole')";
$companyID = $_SESSION["companyID"];change this$companyID = $_POST[$_SESSION["companyID"]];chnage this to either$companyID = $_SESSION["companyID"];or$companyID = $_POST["companyID"];$company_idis from session, so cannot come inPOSTrequest @Ms.Nehal