How to Fetch data from database Using OOPS In PHP

4931 0

This post about how to fetch data from database using oops concept in PHP. In previous post i explained how to insert data. Now from the same table we will fetch the data.


1.Create a apge function.php inside this page define a class DB_con.
In DB_con class define a constructer for dbconnection and write a funtion for fetchdata.

2. create a page where you can create a object for class and call the fetchdata function.



In this article

Join the Conversation