|
|
|
|
All in one PHP and MySql tutorial
This tutorial will show you how to quickly learn basics of PHP and MySql and start developing PHP applications.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.
|
|
|
If you want to start learning PHP and MySql, the first step is to setup complete environment on your local computer.
This will include Apache web server with PHP support, MySql database server and phpMyAdmin tool for managing database.
|
|
|
2.
|
|
|
In the following first lesson you will learn some very basic steps in PHP which will be enough for you to write your first PHP program.
|
|
|
3.
|
|
|
Often in PHP you want the same block of code to run over and over again.
Instead of adding several almost equal lines, you can use loops to perform this task much easier.
|
|
|
4.
|
|
|
You will now need to learn how to handle user input.
In tutorial below you will see how to create a simple form in HTML and how to use this data in PHP.
|
|
|
5.
|
|
|
Conditional statements if and switch are something that you will use in almost every PHP program.
They are used to perform different actions based on different conditions.
|
|
|
6.
|
|
|
Functions in PHP are a block of code that can be executed whenever we need it, without the need to write the same code again.
|
|
|
7.
|
|
|
To store data you will need a database.
The tutorial will show how to create MySql database with phpMyAdmin, one of the most popular applications for managing MySql databases.
|
|
|
8.
|
|
|
SQL (Structured Query Language) is the most widely used language for interacting with databases.
This tutorial will show you how you can use SQL to insert or update data into MySql database.
|
|
|
9.
|
|
|
Using SELECT SQL queries is the most common way to retrieve data from MySql and most of other databases.
|
|
|
10.
|
|
|
In this lesson it will be shown how to use PHP to connect, run SQL query to retrieve data and insert a new record into MySql database.
|
|
|
11.
|
|
|
To make general PHP knowledge from this tutorial useful, see the following example where you will learn how to create simple forum in PHP from scratch.
This tutorial will cover all the PHP knowledge from the steps in this tutorial.
|
|
|
|
|
|
|
|
|
|