How to Insert Data in Database using PHP OOPS Concept

14

- Advertisement -

In this post I will explain how to insert data in database using oops concept.

1.First create a html form
Index.php

2. Create a database with name demos
Inside demos data base create a table inserdata
Sample Structure of insertdata table

3. Create a php page function .php 
Inside this page a class DB_con define. Db_con class contain db connection and insert funtion.
function .php

4.Define a object and class the insert function
Put this code at the top of the index.php page

Download Full source code(Insert Data Using OOPs Concept)
Size: 28 KB
Version: V 1.2

- Advertisement -

Leave A Reply

Your email address will not be published.

14 Comments
  1. Dan says

    thanks for giving these code.

  2. Aabid says

    Your content is very usefull for learning php
    delete data in mysql using php class
    edit data in mysql using php class but thanks a lot sir

Leave A Reply

Your email address will not be published.