Setting up the database in PHP
In this chapter, we will tell you how to create a database and tables in MySQL and also how to implement into PHP. Before writing the database scripts in PHP, we should have a database to insert the information into and read it from.
What do we need in PHP Database
We need three things that execute the PHP scripts and MySQL database. The first one is the server, it is either on your computer or you host it. I recommend you to use Apache server, it is free and also nicely conjunction with PHP and MySQL.
Why would we want a Database?
Most of the beginners are asking this question why do we need database in our application or program. They don't know how useful the database is, when you are making a dynamic website. It provides the variety things when it interacts with the PHP or other scripting language.
What is a database?
A database is a collection of information that integrated logically different types of files and records together in a common place. It is organized in a manner that anyone can be accessed, managed and updated easily.
PHP Hello World
PHP stands for Hypertext preprocessor. PHP has one of the most popular language among the developers. It is a server side scripting language, PHP supports most of the server such as MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL and soon.
PHP Cookies is used to sent the information by a web-server to a web-browser and whenever you accesses that server the browser will give you the same result without changing anything. Cookies in PHP is helpful to identify the user.