I have a page where i'm logging and that page pick up the session_start() that pick up the iduser of the mySQL.
According example below:
archive "usersession.php"
<?php
session_start();
if (!isset($_SESSION['iduser'])) {
header("location:index.html");
}
?>
On that interface has a button for register form in another link that needs saving the iduser at mySQL input.
According the example below:
archive "createform.html"
<input type="hidden" class="form-control" name="iduser" placeholder="Código do Usuário" value="<?php echo $_SESSION['iduser']; ?>">
The code is saving value=0 on database (mySQL), i believe its happen because it is not capture the userid on that new interface. Can you help us?