I have some problem when i try to get data from SQL and save it on excel, i want to download only the data from the login user, from the session.
This is an example of what i want to do:
$query = ("SELECT * FROM tickets_list WHERE UserName = '".$_SESSION['useruid']."'");
$result = mysqli_query($conn, $query);
The top code is not working... what is working is:
$query = ("SELECT * FROM tickets_list");
$result = mysqli_query($conn, $query);
But i don't want to get in the excel file from all the users..
Can anyone please tell me what i do wrong?
Thank you in advance!