У меня есть пользователи имен таблиц (id, username, namalengkap, nik, password, level) и ceklogin.php, ниже приведен код
<?php session_start(); include 'dbconfig.php'; $username = mysql_real_escape_string($_POST['username']); $password = mysql_real_escape_string($_POST['password']); $username = stripslashes ($username); $password = stripslashes ($password); $query = mysql_query("SELECT username, namalengkap, nik, level FROM users WHERE username= '$username' and password='$password'"); while($row = mysql_fetch_array($query)) { $level= $row['level']; $user = $row['namalengkap']; if ($level == 'admin') { $_SESSION['level'] = $level; $_SESSION ['user']= $user; echo '<META HTTP-EQUIV="Refresh" Content="0; URL=homeadmin.php">'; exit; } elseif ($level == 'pengguna') { $_SESSION['level'] = $level; $_SESSION ['user'] = $user; echo '<META HTTP-EQUIV="Refresh" Content="0; URL=home.php">'; exit; } else {header("location:index.php");} } ?>
Я хочу сохранить 2 данных на $user['namalengkap']
и ['nik'], это возможно?