1
00:00:00,450 --> 00:00:06,210
Now we are going to create one sample LAMP application, we are going to create one file Cat index

2
00:00:06,210 --> 00:00:10,330
.php, then start of php code and end of php code.

3
00:00:11,070 --> 00:00:19,470
Now we are going to first write that mean now we are not going to teach php how the PHP works.

4
00:00:19,470 --> 00:00:25,030
so one code we have written that we will make available on the course page also.

5
00:00:25,050 --> 00:00:28,160
this PHP, you can download that.

6
00:00:28,620 --> 00:00:31,800
So in our case, the code is connection that we are using.

7
00:00:31,800 --> 00:00:36,200
mysql connect, we are specifying on localhost connect.

8
00:00:36,200 --> 00:00:43,170
as a annaya user, supply the password s Asdf#1234 and then connect to employee

9
00:00:43,170 --> 00:00:43,700
database.

10
00:00:44,370 --> 00:00:50,820
Then when we are going to perform the query and we are going to store it in q variable, select *

11
00:00:50,820 --> 00:00:52,590
from salary limit 4.

12
00:00:52,590 --> 00:00:58,260
When we want to fetch 4 records, then we want to store that mean.

13
00:00:58,500 --> 00:01:05,490
We want to perform the mysql query by specifying connections string and then specifying the query.

14
00:01:06,150 --> 00:01:11,640
Then we are going to use this while row mysql fetch array results.

15
00:01:12,090 --> 00:01:17,610
Then we are going to display echo employee no, echo department.

16
00:01:17,730 --> 00:01:20,360
Then we are going to specify echo salary.

17
00:01:20,550 --> 00:01:29,190
Then we are going to close with so that each line is written in that mean there is break after each

18
00:01:29,190 --> 00:01:29,480
line.

19
00:01:29,790 --> 00:01:32,850
So that is the code we are going to write.

20
00:01:34,040 --> 00:01:36,200
We are making available this code to you.

21
00:01:36,570 --> 00:01:44,790
So why we have named that index.php because already we have discussed that the first page should

22
00:01:44,790 --> 00:01:47,190
be index.php, in our case.

23
00:01:47,190 --> 00:01:49,590
We are going to create this file offline.

24
00:01:49,830 --> 00:01:52,670
So I will straightway show you this file.

25
00:01:52,680 --> 00:02:00,440
So in your case, you can download from the course page this file and or you can type this code.

26
00:02:00,720 --> 00:02:06,180
So in our case I will be creating this file offline to just save the time.

27
00:02:06,420 --> 00:02:13,470
So then we will be using this code so that mean we are going to create one php application, which is going

28
00:02:13,470 --> 00:02:15,960
to fetch 4 records from the database.

29
00:02:16,350 --> 00:02:19,700
So it will be a complete example of our LAMP stack.

30
00:02:19,800 --> 00:02:26,730
Again, we are keeping this application very simple because we need to understand the concept.

31
00:02:26,940 --> 00:02:32,540
Once you have understood the concept, you can move into the complex application.

32
00:02:32,550 --> 00:02:38,940
You can create complex type of database then for manipulating the data, you can write the application

33
00:02:38,940 --> 00:02:39,720
according to that.
