Report Selecting and retrieving Data from a MySQL Database using PHP and AJAX in PHP Posted November 17, 2016 You keep swapping from one lot of code to another, then just say it works with this? WELL! did you try what I suggested with the problem we are trying to fix with the ajax method????????, cause I really can't tell. OR you know this code works swap with problem code, and change original $con to $conn, if it works problem solved. I'm not switching to any code? I'm letting you know that I have a different file on the same server that works if I use that code. That is the only code for that file. I used it when I first started coding (literally), in order to know if I was able to establish a connection with the server. I will try what you suggested. I'm just very confused as to why that file works and the one we are discussing doesn't. It's the same database and the same user with same password that has access to it. So it should work. The only difference is the table. Thank you for the suggestion. Trying it now.