PHP MySQLi Example Table

From CoderLearner
Jump to: navigation, search

Description

In this example, we demonstrate on how to manipulate MySQL database by using insert, update, delete, and display record. Before you can start this tutorial, you require to have MySQL database up and running. You have to create a database and a table for storing record.

Table

CREATE TABLE student (
 id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 name VARCHAR(200) NOT NULL,
 age INT NOT NULL
);

Note

Your database connection string could be different from what define in this tutorial.