Does the students table have a column called student_name in it?
In your SQL statement, it's recommended to specify which fields you are SELECTing.
Also make use of var_dump() to debug your code.
That will help show you what data that variable contains and how to access it.
Hope that helps,
Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Disable your ad blocker to continue using our website.