{"id":3501,"date":"2019-11-19T16:10:53","date_gmt":"2019-11-19T21:10:53","guid":{"rendered":"http:\/\/teamtutorials.com\/?p=3501"},"modified":"2019-11-19T16:15:29","modified_gmt":"2019-11-19T21:15:29","slug":"inserting-data-into-a-mysql-database-using-php-and-mysqli","status":"publish","type":"post","link":"https:\/\/teamtutorials.com\/web-development-tutorials\/php-tutorials\/inserting-data-into-a-mysql-database-using-php-and-mysqli","title":{"rendered":"Inserting Data Into a MySQL Database Using PHP and MySQLi"},"content":{"rendered":"\n
This tutorial will show you how to insert data into a MySQL database using the latest MySQLi PHP libraries. This tutorial will replace our older tutorial on MySQL libraries and that post will redirect here in the future.<\/p>\n\n\n\n
First, we will assume you have PHP, MySQL, and Apache running. I use MAMP<\/a> for my local development environment in this case. You can download it for free on both Windows and Mac. We also need a SQL client to connect to the database, I’m using Sequel Pro<\/a> on Mac. You may want to use Heidi SQL<\/a> on Windows.<\/p>\n\n\n\n To set up this tutorial I’ve created a database with a table called users<\/strong>. The schema is as follows:<\/p>\n\n\n\n