prepare("SELECT * FROM employee WHERE id = ?"); $stmt->bind_param("i", $_SESSION['employee_id']); $stmt->execute(); $result = $stmt->get_result(); if ($row = $result->fetch_assoc()) { $em_user = textUncode($row['em_user']); $em_role = $row['em_role']; $em_code = textUncode($row['em_code']); $em_email = textUncode($row['em_email']); $em_tel = textUncode($row['em_tel']); $em_permission_role_id=$row['em_permission_role_id']; } else { $stmt->close(); $conn->close(); header("Location: /"); exit; } $stmt->close(); ?>
Version 1.5