PHP MySQL Tutorial
Part 1 - Introduction

Introduction

For many people, the main reason for learning a scripting language like PHP is because of the interaction with databases it can offer. This PHP MySQL tutorial will show you how to use PHPMagic to generate all the PHP code and the MySQL database to store information on the web and include it into your website. By using PHPMagic you do not have to write one line of code. PHPMagic is a Rapid Application Development (RAD) tool for generating advanced PHP applications that connect to and manage data of MySQL databases. It also generates PHP code for creating the web database itself as well.

What Do I Need?

You only really need four things to run PHP scripts which access MySQL databases. Firstly, you will, of course, need a webserver. This can either be on a computer of your own or on a web host that offers you a MySQL database.

PHP also needs to be installed on the web server. If it is not already installed you can install it (or ask your web host to install it). You will also require MySQL. This is the actual database software. In this PHP/MySQL tutorial I will deal just now with the MySQL database. Finally, you will need PHPMagic. You can download our free trial version here.

Managing Databases

Although all the database administrative options can be done through PHP scripts, I strongly suggest installing a copy of PHPMyAdmin on your server. It is an excellent free set of scripts that will provide you with an administrative interface for your MySQL database(s). You can add, remove, edit, backup and view your databases using this and it is especially useful when troubleshooting your databases.

This PHP MySQL Tutorial

Throughout this tutorial I will be showing you some of the basics of using PHP and MySQL together. To do this I will be using an example all the way through using PHPMagic. As you use this tutorial, you will learn how to create a web based music management program. It will allow you to store artist names with their songs, cd names etc. You will be able to update records and search the database.

After creating this system you should have enough knowledge to go on and create nearly any type of database enabled site you want to using PHPMagic. Once you get used to PHPMagic (which takes no time), you'll be able to create amazingly powerful web database applications -- even if you know nothing about PHP, SQL, MySQL, html, ... etc. PHPMagic does it all for you, automatically.

Part 2

In part 2 you will learn how to set up your database in MySQL using PHPMagic.