I have some trouble with code below, what does is to put $level in a $_SESSION and i don't know how it do that. This $level replace my user $_SESSION['level'] and then he is logged out.
<?php
session_start();
if( $_POST['action'] == 'Add' ) {
$level = $_POST['level'];
?>
<form action="<?php $_SERVER[PHP_SELF]; ?>" method="post" >
<input type="text" name="level" value="" placeholder="Level" /><br />
<input type="hidden" name="action" value="Add" />
<input type="submit" value="Add user" />
</form>
Aucun commentaire:
Enregistrer un commentaire