Tuesday, 27 February 2018

PHP Tutorial Step by Step for Beginners

Today I am going to give you a brief introduction to PHP so the first question comes to mind is what is PHP? And What is PHP Stands for right so PHP is an acronym for hypertext preprocessor and it is an open source service-side scripting language that means whenever you make some website you need a server to host your website and PHP is a server-side scripting language that means it can interpret your pages and serve your pages to the client on the basis of the request of the client I will show you a brief or how PHP works in the later. It is an open source server side scripting language right and why we use PHP because PHP is a strong scripting language which can generate dynamic web pages and it can even integrate with the database most of the database like MYSQL or SQL server or any other popular language so that gives us the functionality to make our pages dynamic now what is the difference between static and dynamic pages, static pages are just HTML pages with no functionality you will be able to see just our text there or you will be able to just click a URL and you will be able to go to next page but you if you want more dynamic features for example in email service you want to enter your username and password and on the basis of your username and password you want to give some messages, for example, your user name and password is wrong then you want to show the user that you have user name and password is wrong and please try again or otherwise if the username and password is correct you want to redirect your page to the other authorized page right so this functionality which is dynamic web pages is provided by PHP now PHP script resides between reserved PHP tags that enables PHP to embed PHP script within HTML pages that we will see later because but it has predefined tags so that you know that whatever you write in between those predefined tags will be a PHP code right so furthermore, PHP is an integrated language script are passed at run time rather that compile time. so it’s an interpreted language which or script which pass your pages on the runtime rather than on compile time. so if you want to you know compile your program at a raw or at compile time it will not compile or it will not give you the result it will only give you the result when you want to see this result on the browser for example and it is executed server side that we will see in from the diagram I will show you in a moment and source code not visible by the client so if you want to see the source code because it is a server side language you will not be able to see the food of PHP from the Client side of and various built in function allows for fast development so PHP has various functions which are built in and which will make your programming really fast and it is compatible with most popular databases that I have already told you now in order to see more information on PHP you can go to php.net

and this is the official website of PHP and here you will be able to see much more information on PHP and the very good feature of this website is it has documentation which is very extensive and it is available different languages so, for example, you want to use English and there is a very extensive manual here and you can search for some function that you want to know about for example I want to search for echo function then I will just search for that and you will be able to find all the documentation on this keyword in here in the documentation.

so this is a very good place to you know what function is used for what and what is the functionality of what a function or keyword. so just if you have time just visit this website and you will be able to find much more on PHP.

Now I am going to explain how PHP works so I already told you that PHP is a server-side scripting language so this there will be a server where your website will be hosted and all your web pages will be stored there and they are also PHP resides and PHP is just like an interpreter so on the basis of your client request your server will you know your PHP will interpret the values from the database or mail servers or files from file system and will take this file system or database value interpret those values and then once again it will give the response to the client so it is a server side interpreter which can be used for databases mail server or system. so this is how you can use PHP now what are the popular site using PHP if you want to see that you can go to the Wikipedia page and search for programming language used in the most popular website and in this list.

You will be able to find here that Facebook uses PHP with MySQL and Yahoo uses PHP with MySQL and Wikipedia itself uses PHP with MySQL and Word press also uses PHP with MySQL so one of the world’s most popular website uses PHP for their server-side operations in your website right so it’s a very good you know language and worth learning language to learn right so this is a small little presentation on introduction of PHP in the next post I am going to write how to you know set up the environment for PHP so that we will be able to develop the PHP now website or via PHP server. Please comment on this post and share your social media accounts.

1 comment: