Insert Data Into a Database Table

The INSERT INTO statement is used to add new records to a database table. Syntax It is possible to write the INSERT INTO statement in two forms. The first form doesn’t specify ... Continue Reading →

Create a Database – MySQL

Create a Database The CREATE DATABASE statement is used to create a database in MySQL. Syntax CREATE DATABASE database_name To learn more about SQL, please visit our SQL tutorial. var ... Continue Reading →

Create a Connection to a MySQL Database

Before you can access data in a database, you must create a connection to the database. In PHP, this is done with the mysql_connect() function. Syntax var ... Continue Reading →

MySQL Injection

MySQL – SQL Injection Prevention If you have ever taken raw user input and inserted it into a MySQL database there’s a chance that you have left yourself wide open for a ... Continue Reading →

Example Explained – The MySQL Database

Example Explained – The MySQL Database with PHP and AJAX The database table we use in the example above looks like this: id FirstName LastName Age Hometown Job 1 Peter Griffin 41 Quahog Brewery 2 Lois Griffin 40 Newport Piano ... Continue Reading →