It's bad form to post a screenshot of your IDE. You should instead paste the code in here and use the code formatting markup.
Your problem is that you fail to check for errors when you connect to the db in line 11. $con->query is not returning an object. According to the docs on mysqli::query, it returns FALSE on failure. You should check the examples in the documentation about how to check for errors when connecting to and querying a database.