How to Fetch data from database Using OOPS In PHP

This post about how to fetch data from database using oops concept in PHP. In previous post i explained how to insert data using OOPs concepts. 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.

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *