How to insert data into database using HTML form

“How to insert data into database using HTML form” is locked How to insert data into database using HTML form

Hello, In this post we will learn about mysqli query to insert data into database using  HTML form. For this process we have to required 2 files, one is HTML file and another is php file. HTML file is used to create a HTML form and php file is used to define database connection or insert query. Here i created a simple HTML form that have <input> text field and submit field to trigger insert query. index.html

From above HTML form, when user fill the fields detail and click…

Read More

How to insert data using MySQLi query in php

How to insert data using MySQLi query in php

In this tutorial you will learn how to insert records in a table using MYSQLi query . Let’s start to create a INSERT INTO statement with values using MYSQLi Procedural and MYSQLi Object-oriented method. Here we are going to insert a record into user table by specifying coloum fields like: ‘ user_id’, ‘first_name’, ‘last_name’, ’email’, ‘phone’. Here ‘user_id’ is an  AUTO_INCREMENT PRIMARY KEY  coloum. Example: MYSQLi Query MYSQLi Procedural Method

  MYSQLi Object-oriented Method MySQLi Object-oriented method is more faster and secure than MYSQLi Procedural method. That’s the reason…

Read More