PHP MySql Select Query

PHP MySql Select Query tutorial will explain you How to make a database in php with ExamplesPHP MySql Select Query is used to get information from the database.

Select data from database table in PHP MySql

In order to display the result from a MySQL query, we will store the result in array and then echo out each row in a while loop.

We will use a table containing the following fields:

  • ID – auto generated integer
  • FName – First Name, varchar
  • LName – Last Name, varchar
  • PHONE – Phone number, varchar

Example on PHP MySql Select Query:

Output will be:

1 Jon Job 9634234976
2 Kim Kad 8912543287

Display the result in HTML table

Output :

ID First Name Last Name Phone Number
0 Kim Kad 8912543287
1 Jon Job 9634234976
Previous articlePHP MySql insert into
Next articlePHP MySql WHERE clause
I am a young Information Systems Security Engineer(CEH). I had started with penetration testing when i am 17 years old. It all started with Kali linux and Metasploit.In free time i will play with Security holes/Bug bounty/Pentesting and Hacking !!!