PHP Expert Full Course | PHP Tutorial For Beginners | PHP For Beginners | PHP Tutorial | Simplilearn

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone and welcome to the full course tutorial on php programming by simplylearn in this video we'll discuss everything you need to know about php now before we begin make sure to subscribe to simplylearn and do hit the bell icon to never miss an update so let us see what we've got for you in this video first we'll start by a proper introduction to php followed by learning how to use xam software to build our first hello world php program then we'll learn all the basic php programming concepts right from the very beginning to loop scenarios we will then move on to learning about object oriented programming in php next we will have a look at some php extensions that can be integrated into visual studio code for a better programming experience we will also learn about php get and post methods followed by a tutorial on how to implement mysql with php php form validation cred operations in php php registration and login form we will also discuss rest apis in php followed by an extensive web development tutorial by creating a website next we will also work on an ecommerce website tutorial and finally we will have a look at the most frequently asked php interview questions so without any further ado let's get started let us first meet rob rob is the owner of an e-commerce business earlier his customers were very happy with the products they purchased from his website but with more traffic and user base rob started receiving complaints from his customers not related to the products but the website itself now the customers were facing challenges like slow website speed bad user experience and poor security features like any other business owner rob wanted to rectify the problem but he was unable to find a solution to it well developing his websites in php can solve all of rob's problem and guess what php is simple to learn and easier to implement let me elaborate on this so php is useful in many ways as first and foremost it can make the website function faster it can create dynamic web pages and dynamic web pages are what makes a website more interactive next it provides security encryption it is a cost efficient language it is very compatible as it works efficiently with different databases and programming languages and it is platform independent which means a php application can run on any environment now before moving into the details did you know that 79.2 web is still powered by php which nearly translates to 20 million websites and 1 million web servers now in this presentation you'll learn about what is php how does it work differently from a conventional web page what are its features some major companies where php is implemented prerequisites on learning it and finally we will have a look at the demo for our first php program now without further ado let's get started so what exactly is php php stands for hypertext preprocessor which is a recursive acronym it is an open source server-side scripting language that is embedded into html and used for web development now before we get overwhelmed by the technical terms let me simplify them for you now for those of you who don't know open source is a term for technology which means it is freely available to everyone while server-side scripting means that from writing the code to implementing and processing it everything is done on the server side while the user just lays down and enjoys the experience now that we know what php is let's see how php script looks like as you can see on the screen this is the syntax of php it opens with an angle bracket question mark php and ends with a question mark and an angle bracket while the code comes in between them now as you can notice this is very similar to how html codes are written now let's have a look at some features of php now while php being a very diverse and feature rich language some of its main features are listed here let us try and understand them one by one first is simple now this feature comes as a good news to new learners since php is simple and hence an easy to learn language next comes flexibility php is a highly flexible language in conventional web pages even the smallest of changes have to go through the developer who changes the code to implement them well php gives you the flexibility to make small changes without the intervention of the developer itself it is also platform independent which means it does not require any special plugins to run and can basically run on any environment next is interpreted php is an interpreted language and does not compile the entire code hence taking less time which takes us to our next feature that is fast websites developed in php are faster this is why developing dynamic websites using php is considered as the best option as discussed earlier too php is called as an open source language which means it is free to use and implement next feature is security the language consists of a few built-in frameworks that provides benefits like encryption and hence protection from cyber attacks next is a large php community since php is an old language it has grown up to a large community which is very helpful and makes the language more stable so that was all about features of php moving forward let us discuss the workflow of a php web page how does a ph page work so for a better understanding let us first see how a basic html page functions in the basic html workflow when you open a website on your browser a request is sent from the browser to the server and the server then returns the requested page stored on it back to the browser now that's it no matter what device or what purpose you open the website for the page return is always the same or you can say static now what php does different is when you open a website developed in php a request in dot php extension is sent to the server into the server there exists a php interpreter which recognizes the dot php file and interprets it based on the request from the browser it pulls out data from its database and file systems and returns a html page personalized according to the user now let me give you an example to make it more clear when you log into your account on drop's new e-commerce website made on php it takes your unique request to the server and shows you products based on your past preference and liking instead of showing you the exact same page every time now this makes the website dynamic and more interactive to the user also guys before moving forward if you are enjoying this video please give a thumbs up and subscribe to simply learn for more such content so that was all about the workflow of php let us discuss the companies using them many companies have reached great success by implementing php into their websites let me list down a few of them first comes facebook the biggest social media platform did you know that facebook was created entirely on php and according to the website similar web php is visited by users for nearly 22 billion times per month this means the social media platform has to deal with huge traffic volumes and php helps a website with this now before moving to the next website a quick question for you guys what is the one site everyone goes to for information correct it's wikipedia and guess what it is written in php2 now platforms like wordpress which are used to create beautiful websites itself are also based on php and blogging and social media channels such as tumblr and even multi-service platforms like yahoo which face huge amounts of data traffic every day uses php to function so now that i hope you're more motivated to learn php let us look at some of the prerequisites of learning it now since php scripts as already discussed are embedded into html codes a basic understanding of html comes naturally as a prerequisite again a website cannot be complete without the implementation of css hence a basic understanding of css is also a must next is basic knowledge of programming language now this is not necessarily a prerequisite but if you have basic knowledge of programming fundamentals such as oops concept functions and errors etc it would really help you along the way let's get started and learn what exactly is zam now zam stands for cross-platform apache server maria database php and then finally perl xampp is an open source application that is developed by apache friends and is one of the easiest ways to host a local web server with access to mysql database php and perl so it is an all-in-one package so now that we have an understanding of what zamp is let us set up the software on our system and then see how to use it to run a php script so now to set up the xampp software what we need to do is let us open the browser and download our software so as you can see here apachefriends.org is the official website from where you can download the sam software since we are using the windows version we'll download it for windows although it is available for linux and mac os as well now let's wait for the download to get finished it almost is now let's open the setup and install our software right away continue installation next now from here you can select all the extra files that you want to install along with the xampp setup or you don't want to install now this is the default folder for zap installation that is c drive xampp and i would recommend you keep it that way i think there's some issue here yeah well this is the folder for my old xampp now we wait for the installation to get finished and then we'll run a quick php script a welcome or hello world kind of script to see how this zam software functions along with php now the installation is almost done we'll just wait for a few now the installation is complete and now let us open the control panel to check if it's done correctly yes everything seems fine now so this is the control panel for the xampp software which includes all the services provided by it and in our php tutorials we'll be mainly using the apache server and the mysql one so you need to click on apache server started and mysql now apache server will show you the default port on which it is running now to check if xampp is correctly installed on your system let's open the browser again and type localhost now this will open up the dashboard for the xampp application let's click on phpmyadmin and the information is available here so the installation is complete similarly we'll install the visual studio port since i've already installed the software on my system i'll not be doing that now let us come to the important part let us redirect to c drive and there we have a xampp installed open the xampp folder and locate htdocs now this is the folder where all your php files codes and website related data will be stored now we'll open the htdocs and let us create a new folder here since it will be a first program let us name it first php now let's open our code editor that is visual studio code click on open folder locate to xampp htdocs and the folder we created first php as you can see let me close this first as you can see first php folder is visible here let us create our first php file let's name it hello dot php now don't forget the dot php extension otherwise the code will not run now since a browser only understands html code we will have to embed the php script into the html code itself so let's begin let me zoom it a little bit so you can see clearly let me add a heading so h1 will be too big let's keep it to h2 my first php webpage let's write our first php script so a php script begins with an opening angular bracket question mark php now we'll write the php script that is echo hello world now echo acts as a print function which prints any string that is in front of it in this case it will display hello world onto the web page let's close the script with a question mark and a closing angular bracket and also close our html code now before running a web page let us first check if the web server is still active yes the web server is still running so let's open the browser type localhost now type the name of the folder that you've created that is first php now as you can see our hello.php file is presented let's click on it and as you can see our first web page is visible which shows the heading my first php webpage and the hello world from a php script in this video on php programming we're going to discuss different php concepts from the very basics such as syntax hello world program up until learning how to collect form data using php scripts and also cover a lot more concepts in between now what we need to do is to use visual studio code what we do is we go to c drive xampp folder or wherever you have installed your xampp software we go to that folder locate htdocs and let us now create another folder and you can name it anything that you want to based on your project since we are discussing the concepts let us name it concepts now right click on it and here as you can see it shows open with code when you click on it you can see that it opens visual studio code for you along with the concepts folder that we just created now this is where you will create all your files for your project and will be writing all your all of your php scripts now let's create the first php file from here new file let us name it tutorial dot php and see how a php syntax looks like so a php syntax begins with an angular opening bracket question mark php and ends with a question mark and a closing angular bracket while the php script goes in between so this is the very basic syntax of how php scripts are written now let us move on and see how to write a hello world program using a php script so to print something on php echo is used now to use echo what you need to do is just write the string that you want to print in front of it and save the program so hello and welcome to simply learn let us close it and save the file now i am going to show you how to use the sam software in order to run php scripts go and open your xampp control panel and from the control panel you have to start this first service that is apache now this is going to start a local web server on your system now open your browser go to a new tab and type localhost followed by the name of the folder that we just created into htdocs that was concepts and hit enter here you can see the file that we just created tutorial.php and when you click on it you can see your first program visible here hello and welcome to simply learn now suppose you have a program that needs to print this exact same string again and again throughout the program so what are you going to do type the entire echo statement through your code or make it simpler now to make it simpler what we need to do is we need to go back to our code and discuss the concept of variables now to create a variable what we need to do is we need to use this dollar sign followed by the name of the variable you can name it anything you want so let us name it str and type hello and welcome to simply learn so this is a first variable now this variable str stores this string value also you can create different variables for different purposes such as if you want to store a number suppose so you can store number five and suppose you want to store a floating variable and that would be float and a floating variable is a number of decimal points so 7.6 so now we have three variables in our program now one thing to notice if you're coming from a different programming language is that you don't need to define the type of variable in php that is if it is a string number or a floating variable now to print this we can use echo but when you want to print a variable in echo you need to do things a little differently so let us start with h1 heading now to print a variable what you need to do is you need to use dot followed by the name of the variable that would be str and another dot followed by if you want to type something along with the variable i'm going to copy this code and paste it now let us change the size of the headings and also change a variable so in the second line we are going to print num and in the third the float that we created so now we have all of our variables into our echo now let us save this program and see what it does so as you can see the variables are printed on your program and you don't have to write them again and again you can simply write name of the variable along with echo and dot and print it along now that we know about variables suppose you want to print the names of different laptop brands available in the market now what you're going to do do you create different variables for each name that is a variable for hp a variable for lenovo variable for a source or do you want a single variable to store store all of the names of the laptop brands available now with arrays it is possible to store different information of the same data type that is integer string under a single variable the condition is all of the data that is stored under the variable should have the same data type now let us see how array works now array stores multiple values in a single variable as we already discussed now to make an error first what we need to do is name a variable laptop brand and type in array function and under that function we are going to write the names of different laptop brands that is hp with separated by commas lenovo asus and dell so suppose these are the four laptop brands that are available in the market in your area now what you need to do is you need to print what is in this particular variable that is laptop brand so to print it you need to first create variable dump now what variable dump does is it as you can see here it exports the variable that is in its function now we are going to [Music] write the variable that we just created into the variable dump function and it will just return the data type and value now suppose you want to print it so to print it what we need to do is just add echo in front of it okay now before moving on to seeing the result of this program let us just make this part of the code inactive now to do that we are going to learn a new concept in between that is comments so comments are the lines in a code that are not executed while the program is run so a single line comment starts with two slash and anything written in front of it is does not run along with the code so these comments are very useful when you're writing a code to make your code readable and more understandable by any coder who will or might later on using the code that you just created now suppose what we can do with comments is i'm going to write a comment just in front of it this is a string variable now after these slashes anything written is not executed when i'm going to run the program also now what do you do if you want to make this whole part of the code not functioning do you add two slashes in front of everything or you can use a much simpler method that is multi multi-line comments to use multi-line comments what you're going to do is you slash star this marks the start of the multi-line code and to end this use star and slash again and everything in between does not run when you're going to run your program so we will now see how this array works we will just reload this page and as you can see hp lenovo asus and dell are visible here also you might notice this array 4 shows the length of the array and this shows the position where all of these strings are inside the array that is an array starts with the zero position not one but zero so the first would be zero position that is hp and then one lenovo and subsequently asus and dell now suppose you just want to print the second variable in your array what you need to do is you need to go back to your code and in front of the variable you need to write the position that you want to print under square brackets that is the second position in array would be number one and save the code go back to the browser and only the second array is the second variable in the array is visible now suppose instead of a variable you want to create a value that you don't want to be changed throughout your entire program so consonants are used for the same purpose now consonants are very much like variables except that once they are defined they cannot be changed or undefined so let us see how consonants work first we will put this code under a comment and now start writing a consonant so to define or create a consonant what you need to do is use the define function and inside the define function what you need to do is you need to write the name of the consonant and okay first let us write the name of the consonant suppose laptops followed by the value of the hp consonant lenovo and asus and that's it and you close the define function and there you have defined your consonant in your php script now this cannot be changed or undefined throughout your program now to print it what you need to do is type echo followed by the name of the consonant that you just created so the name of the consonant is laptops save the code go back and hp lenovo and asus are visible here you can also create consonant errors along with a normal consonant now to create a consonant array you just need to add a square bracket just a second let me close this one separated by commas and now we have the names of the laptop as an array which by the way cannot be changed or undefined through your throughout your code just like any other consonant now suppose you want to just print the name of the third laptop that is available in the market now what you need to do is you need to write the position and the third position in case of arrays would be number two save and only asus is visible here so this is how consonants and variables work in php now before moving on to the next section let me give you another situation now suppose i want you to print a number only and only if it is greater than 7 how do you do that now since it is a condition conditional statements are used to perform different actions based on different conditions now some of the conditional statements include in php are if if else if else if else and switch and we're going to discuss them one by one no so the first one is if now let me create a variable let us name it bear and write the value 8. now the example that we just discussed if we want to check if this variable is greater than 7 and only and only then print the variable on our screen now to do that what we need to do is type in if and in the bracket we need to type the condition that we're going to check that is if variable greater than 7 now use curly brackets and inside the curly bracket write the code that you want to execute only and only if the condition in of this if is met so we need to print this variable so echo where and go and save it now go back and reload and you can see it is printed here now let us go back and change the value of the variable to 5. and save it go back reload and as you can see nothing is printed on the screen since the condition that we just mentioned inside if does not meet now suppose i tell you that if the condition does not meet you have to print a string saying that the condition does not did not meet how do you do that to do it what you need to add after if is else and else does not need to have a condition since as the english word suggests it is else which means the condition of if did not meet and inside the else we're going to write the code echo the condition did not meet save it the condition did not meet now time for another condition now suppose i want i ask you to check if a number is divisible by 2 3 or both how do you do that now to do that first let us create a number six now check if variable percent two is equal to equals to 0 now what this shows is this brings out the remainder and if the remainder is 0 that means it is divisible by 2. and we need to add one more condition here and and variable percent 3 equals to equals to 0 and what this does is it checks if both of these conditions are true that is if the number inside the variable is divisible by both 2 and 3 we will display divisible by both now what we need to do is we need to check if it is divisible by 2. so else if since it is else if we need to add a condition in it too else if variable percent 2 equals to equals to zero echo there is a built by two similarly divisible by three another you can add as many else if statements as you want and the final else will show okay let us go back and save our program since a variable is six it should show divisible by both and you can see it shows exactly the same divisible by both now let us change the value and see if our program works so what we are going to do is we are going to change the value to 4 save a program and run it again this by two similarly nine divided by 3 and finally 13 not divided by either two or three so this is how you can make use of if else if and else statements now the next conditional statement is switch statement now the switch statement is used to perform different actions based on different conditions so let me again give you a situation so that you understand better so suppose you're playing a game which has four different levels and first level is easy medium hard and extreme so you need to print that now what will you do you can also use if else if but it's a lot of code switch statement makes it a lot simpler and more readable so what we need to do is we need to type in switch okay first what we need to do is first we need to create a variable so a variable suppose let us name it level and level is three to create a switch statement you need to type in switch and enter the name of the variable that will be passed into the switch statement to check for the conditions level and it also begins with a curly bracket and inside the search statement what you need to do is you need to type case that is the first case would be case one followed by a colon and the statement that you want to execute that is echo you are playing at easy level and since you want your program to stop here itself what you need to do is you need to type in break similarly for rest of the levels i'll just copy this code here two three and four and just make the changes and similar to if else statements you also need to add another statement that would be default if any of the conditions are not met in the switch statement suppose the value of your variable is 20 which does not make any sense to the game then what you need to do is you need to display a default error message and that would be invalid input and you also need to end the switch statement with a curly braces and end the php program all right let us save it go to a browser and run you are playing at hard level i guess you must have understood the concept let us just one more time change the value of the variable to 20 save it go back invalid input so this is how the conditional statements in php work next what we're going to talk about is php loops now suppose you want to run a block of code or a part of code again and again and again or in other words in loop so php has that functionality known as php loops to do the same task now there are different types of php loops available that is while do while and for loops which we will be discussing in this part of the video now let us start with the while loop now the while loop loops through a block of code as long as the condition that you have entered or specified in the while loop is true so let me just remove it now to write a while loop what you need to do is type file followed by the condition and to write the condition what we need to first do is let us create a variable and we'll give it a value of 2. now the condition which we are going to write is this is just an example so if or while the value of variable is less than equals to 10. and then we follow along with the curly braces and type the code that we want to run again and again until the value of a variable becomes 10 or till the value of a variable is less than 10. suppose [Music] number and then the variable that is where and that's about it now what we need to do is we need to increase the value of the variable else this code this code will run for an infinite amount of time and the system might crash so to increase the variable in each iteration what we need to do is we need to use the plus plus operator which will increase the value of the variable by one in each iteration now we're going to save the code and run it number two three four five six seven and so on let me just add break here and you can see all of the numbers up until 10 are visible here and after 10 the loop just stops so let me explain it again so what we are doing is we are writing while along with the condition until then the code is supposed to be run again and again so the condition is if the value of the variable is less than or equals to 10 since a value of value of our variable is 2 the condition is true so the code inside of this vial is executed and the code will display the value of the number and the variable value will increase with each iteration until it becomes greater than 10 and then the loop will exit now the do while loop is very very similar to the while one the only difference being in case of a do while loop a code this this code will execute at least once i'll show you how it works so in case of do while we start with two curly braces let us use this same example and after the curly braces what we do is we write while along with the condition that is equals to 10. let me just okay now let me tell you what do we need low value suppose the value of a variable is 11 now since the condition does not meet in case of the while loop it will not even run once now suppose you want to display the current value of the variables whether or not if it meets a condition at least once so in case of do while it will first go into this do loop run the code and then after the do loop is complete this part of the code is complete it will go on to the while part and check the condition now if the condition does not meet the loop will end here and if it meets it will continue until the condition does not meet the while part so it will run at least once now save this and go back to a browser and reload this program and as you can see number 11 is visible here so do while is helpful in some cases which you'll realize as long as you start coding more and more now next up is follow now for loop is used when we already know how many times you want the loop to run so for loop is used when you want to run a piece of code a specific number of times now let me show you how it works now the for loop is written in three parts here we don't need to define a variable beforehand the first part of the for loop is defining the value of the variable so variable is equals to let us value it at one now we want to make it run till suppose six values so what we need to do is we need to write the condition in the second part of the for loop a variable less than equals to 6 and in the third part will be the incremental part so as you can notice in while and do while we put the incremental part inside the block of the code here the incremental part is inside the for function itself variable plus plus and then we start with the curly braces and we write the code similar to i'll just copy it from here and now let us just save it and print to show you how it works number one two three four five and six now these loops are a very important aspect of programming and you all should try out different problems based on loops by yourself now next up in php is php functions now functions are very very useful and very important part of programming in any language functions are of two types built in functions and user defined functions now built-in functions are the functions that are already present inside the framework of your programming language a very popular example of a function built-in function of php is echo echo is a function that is already built in php and is used to print out variables strings and values on the screen now user defined functions are functions you create yourself to use a code repeatedly in your program so i'll explain you with while writing the code itself so suppose you want to use this for code four or five times in your program so or even more maybe 10 20 30 40 100 times in your program if you're writing a very very large program you want to print or use this part of the code 100 times in your program what do you do do you write this entire code or copy paste this entire code again and again 100 times and make your code lengthier or do you just want to use this piece of code from here from anywhere in your program now to do that we need to put this piece of code inside a user defined function so how do we do that we do that by writing function followed by suppose you want to call this function a name name and start with curly braces now this is a user defined function named name now inside this name function is a piece of code this for now how do we reuse it i'll show you in a second so suppose you are a long way from your code from this code you don't even know where it is you want to use this code again after writing hundreds of lines of code so how do you do it you just type the name of the function that is name and close it that's about it this is called calling a function so it is similar to calling a friend for help so here you just called your friend name to execute this part of the code here save and where there are no changes since the output will be the same let us make some changes add another echo and going to run it again later and call this function again save it and as you can see once the function is called the output is printed and i am going to run it again later and then again the function is called and it uses the same piece of code again and again and again see how simple coding can be when you know what to use when now let's move ahead and understand the concepts of oops in php so as you can see on the screen i have listed down the eight concepts of oops that we will be discussing today first is class next comes objects then its member function and member variables then constructor and destructor inheritance and finally it is polymorphism now lets walk through each of the concepts one by one first is class it is a blueprint of an object that provides initial values for the state a class consists of both data and functions and data and functions together are called objects now let's first have a look at the class let me create a file named class.php and let us write the code first so um here i have defined a class by using the class keyword followed by fruit which is the class name next i have added a pair of curly braces and added the entire properties and methods within the braces so as you can see on the screen we have declared a class named fruit that contains two properties called name and color along with that i have also added two methods set name and get name now now the purpose of these methods is for setting and getting the name property so let me give you some important information so when you define a class a variable in it is called property while a function is known as method now let us execute the code and see the output let's go to the browser and type localhost followed by the file name here is a file class.php and as you can see on the screen the code is running perfectly now that was about the class next comes objects so it is an instance of a class basically a variable holds a date of a class now we define a class once and create as many objects in it so for a better understanding let me give you an example suppose a car is a class so mercedes-benz and bmw would be objects now let's see objects classes are incomplete without objects so we can add as many objects as we want from a class and every single object has the properties and methods defined in the class but those objects will have different property values so objects of a class are created using the new keyword now let me open the code editor and let's create another file called obj.php so this code will be the same let's copy and paste it here now let me type the code for object [Music] as you can see i have used the new keyword to create object of the class fruit similarly banana would be another object and now we'll use the set name function to set the name to apple on this object on the apple object that we have created similarly we will set the name for the banana object there's an extra bracket here let's move it now moving forward let us type the code to display what we have added into the objects for this can you guess which method we'll be using yes the get name method will be used to display the name saved onto the object using the set name method now that our code is complete let us run and check if it's working correctly let me go back and refresh now here we have our object.php file yes the code runs perfectly the fruit program and it is displaying apple and banana from the two objects that we created i hope now you have clearly understood the concept moving on to the next one let's talk about the member variable and member function a member variable is defined within a class the data can be accessed by the member functions alone now once the object is built these variables are called attributes of the object whereas member function is defined within a class and is used to access object data so next comes constructor so it allows an individual to alert an object's properties while the object creation while a destructor is a function that is called when the object stops working we will have a look at the constructor program so constructor allows an individual to alert an object's properties while the object creation now suppose you build a program using constructor function php will automatically call the construct function while creating an object from a class also remember that when you write the construct function always prefix it with two underscores now let's have a look at the example where we will be using a constructor function with calling the set name method now this set name function is often used when you assign a value to the name attribute now let's open the code editor and create a constructor file we'll again create the two properties named name and color now we will create a constructor with two underscores and a construct keyword and i'll give the two properties as attributes to the constructor now in this program we'll be using the constructor function as the set method to set the names and color of a fruit by default during the object creation itself we still need to create the get functions now let's create an object to invoke the constructor now since the constructor has attributes we will have to give the values for the attributes as well so the fruit would be strawberry and color would be pink so this creates a new object and it gives the values to the constructor in the php script and our html code as well let us save the code and check if it's working let's go back refresh now constructor file is visible let's click on it and yes so when the object strawberry is created the attributes we have given to the constructor strawberry and the color pink were already assigned to it and it is displayed in the browser itself now that the constructor program is done next let's see an example of how a destructor works let's open the code editor create another file destructor.php now the destructor code will be very similar to the constructor one so we will copy the code into the destructor file and make some changes so let us remove this we don't need it and write our destructor function so destructive function is written similarly how constructor function is written so it starts with two underscores and a destruct keyword it does not have an attribute now why did we delete the get functions is because we will be using the destructor for it also we won't be needing this just the object creation is sufficient now let's save our program and do the drill again open the browser here a destructor file is visible and it shows the fruit is strawberry and the color is pink so when the object function is complete and the program ends the destructor function is called which displays the strawberry and the color pink now comes inheritance so it derives new classes or child classes from the parent class however inheritance can have its own properties and methods too so inheritance has two classes first is parent class and the other one is a child class now let's talk about each of them in detail so parent class is otherwise called a base class that is inherited from another class and a child class is a subclass that inherits from another class a child class can have sub classes and derived classes now let's have a look at the inheritance program so the child class is derived from all the properties and methods from the subclass in addition it can have its own properties and methods too so an inherited class is defined by using the extends keyword let's look at an example let's open the code editor so i've taken the liberty to create the inheritance.php file and write some of the code that we have already written so i'll be writing only the code that is necessary for the inheritance part now also remember when you derive a child class from a parent class only the public methods are derived into the child class so we will be creating the methods as public in order them to be inherited this make this function public let's end this class and create another class in order to inherit this class so we'll name another class as cherry extends fruit and we'll create another function for cherry so this function is exclusive to cherry so we have given a message through this method now let's create an object cherry new cherry and give the values for the attributes of this constructor let's save the code and check if it's working well there seems to be an error now let's try to resolve it okay got it so we created the object within the cherry class so it got localized what we need to do is put that code outside of the cherry class and it should work fine now yes so is cherry a fruit or a berry a cherry is a fruit and the color of the fruit is red and now we will talk about the last concept that is polymorphism so polymorphism has many forms the same function is utilized for different purposes it has a class with a variety of functions simultaneously sharing a common interface so inherited methods are overridden by redefining the methods in the derived class now let me write the code to make it clear so i've already created the polymorphism php file i've copied the inheritance code into the polymorphism part and then now we'll make the changes into the derived class that is cherry so let's create a property named width now to override the constructor and the intro function from the fruit class we will have to create the same functions in the derived class also now this function construct has got one extra attribute in comparison to this function construct let's create the intro function too now a code is ready let us create another object to invoke the functions now did you notice what we did here so when we created the object cherry for the cherry class we gave three attribute values instead of two in order to invoke this construct function not this let us run it and check so it runs perfectly it displays the fruit the color and the weight in this video we will discuss some php extensions that can be and should be added in visual studio code to make php programming a little easier and a life's a little simpler now to check the extensions available or search any of them we need to go to this tab that is the extensions tab now these are the already installed extensions on our system and from here you can search extensions available in the visual studio called marketplace now the first extension and a must-have extension is php intellifence now to understand what it does let me go back to the explorer and open a test.php so what i'm going to do is write some basic php built-in functions let us say php info so what you need to notice is when you type php info it shows a suggestion it is from the built-in feature that is already installed into the visual studio code but when you click on this that's it now i'll show you the difference go back to extensions and install php intellifence now go back to your test file and again type php info now as you can notice you can see two php infos here now when you click on this one you can see all the details about this function available right here so this is what php intellifence is it intelligently suggests and autofills parts of your code to make your programming simpler and much easier now moving on to a second extension our second extension will be php mess detector now what phpmes detector does is it analyzes your php code on every save now there's no additional setup required if php is already installed on your system which already is so to see what it does let us install it now before that let us go back to test.php and let me just open this now here you can see the output of your code so if you go back to phpmes detector install it and go back to your code you can see phpmes detector is visible here and after everything that you write it analyzes your code after every save and it is pretty useful while writing big and complex php codes now let's move on to the next extension which would be php auto close tag now what php auto close tag as the name suggests does is when you open a tag when you whenever you write a tag that is suppose html or body etc etc anything that you write it will automatically close the tag and you can simply start writing the code so this extension has saved me a lot of time finding what problem is in my code fixing the bug when actually it was just that i did not close the tag so suppose i write html and as you can see it automatically closes the tag and you can simply start writing the code now moving on to our next step that would be php fmt that is php for mata now what it does is it formats your code with proper indentation and well your code looks much more readable after this so let me just show you i've already created a test2.php let me just close this so as you can see this code is not indented at all and one might have trouble understanding what is going on and what part of code is under what loops and statements so we go back to our extension php formatter install it go back to test one sorry test two now when you right click after installing this extension you can see format document section available then when you click on it the code gets automatically indented and looks much more readable now so as you may notice all these codes under comes under the if conditions and that's the rest of the code looks much more readable now now the last extension that i'm going to discuss is php debug now this extension you may not use it on a very regular basis but this extension is very helpful when you want to debug your code and see what's wrong with it all the instructions on how to use this extension are written alongside it and how to install how to use how to install extra servers in order to completely utilize its potential since this extension is a debug adapter between visual studio code and x debug website that was developed by derrick ruthens so i'm going to install it and this is the very website x debug where any of your code is debugged so these are some of the extensions that you need to begin or ease your journey into php there are lot more extensions available for php and you can explore more into them as you move forward we will look at php in get and post so all of us know that php is a scripting language for creating web pages but what is get in post there are two ways the browser client can send information to the web server the get method and the post method let's understand get method in detail first the get method sends the encoded user information appended to the page request the page and the encoded information are separated by the question mark character now let's know more about the get method the get method produces a long string that appears in your server logs in the browser's location box it is restricted to send up to 1024 characters only also never use the get method if you have a password or other sensitive information to be sent to the server since it will show in the browser's location box next the get can't be used to send binary data like images or word documents to the server also the data sent by get method can be accessed using the query string environment variable now let us try writing a code to understand the get method better so as you can see we have got the output but if you look at the link it has an ampersand symbol along with the username and age we entered now before the browser sends the information it encodes it using a scheme called url encoding in this scheme name value pairs are joined with equal sign and different pairs are separated by the ampersand also as we discussed earlier the page request and the encoded information is separated by a question mark sign so that was all about the get method moving on to the next one let's have a look at the post method now the post method transfers information via http headers the information is encoded and described in the get method and put into a header called query string the post method does not have any restrictions on data size to be sent the pos method can be used to send asci as well as binary data and the data sent by post method goes through http header so security depends on http protocol used by using secure http you can make sure that your information is secure now let's have a look at the code now now you must be wondering if both the methods give the same output so what is the difference between them well the major difference between post and get method is that get method carries request parameters appended in url string as you can see here the parameters are visible in the url while post carries request parameters in message body which makes it more secure way of transferring data from client to the destination as you can see there is no information in the url now a lot of people have raised a request to create a code on the request method too so let me tell you the request variable can be used to get the result from form data sent with both the get and post methods let us try out a code for the request method too as you can see we have got the output today we will learn how to link mysql database to your html code with the help of php now to do that we will build a simple registration form whose data will be uploaded to the mysql database and in this tutorial you will learn how to create that database how to link it to your web page and also how to delete the tables or entries from the database now before proceeding i am expecting that you guys have some basic understanding of html php and mysql so without further ado let's get started also guys for this tutorial we will be working on zam and visual studio code now let's get started so first we'll open the c drive zam folder htdocs and let us create a folder let's name it tutorial and open the visual studio code and start writing the code for a registration page let's create a file and name it index.php so you do let's give the title as registration form and close the head now let's give some heading to a registration page now to make it a little more interesting let us suppose the registration page is for a blood donation camp so we will name our heading as the blood donation camp and close it now let's give some background color to the page now to give some background color we need to first know the code for it let's search for color codes well i like the saffron one let's copy the code paste it here write div a heading for the page registration form as you can notice i wrote this heading as h1 and this one as h2 since this will be a little smaller from the first one close the div and write a form now in this action part write connect dot php and this is the file which we'll be creating later in order to connect our registration page to the database and method as post let's name it user so the first entry would be named input type would be text and we have to give every entry a name in order to use it in the php code to connect to a database let's give this name name now what i did here is i put the required keyword here which would make it compulsory in to fill this section of the form in order to continue i'm giving these break lines to not make the form clumsy email so naturally this would be the label for email and let me skip ahead with this section so i have written the code for the different fields that we are going to have in a registration page so the first one was name second email third would be the phone number and fourth obviously the blood group of the person registering as you can notice i have given necessary type for different fields so for email i've given the type as email for blood group text and phone as text in case someone wants to enter the entire phone number with the country code so now let us create an input button that would be submit and name let us keep it submit id would be submit let's close our form and close the web page too now let's save it and check if it's working correctly now let's open the browser before that first we need to open the sam control panel and start our apache server and mysql server and now let us go to the local host type a folder name that is tutorial and open the form well there seems to be a problem the other fields are not visible let's open a code and see what did we do wrong yeah well there's a spelling mistake here and since i copy pasted the code the mistake got copy pasted too well let's save it again and check if it's working correctly yes perfect now before moving on to creating our connect.php file we first need to create our database itself so first we need to go to zam control panel and click on admin now this will open the php my admin section where we will go to new and create a database okay let us name our database as test1 let us give it five fields and name it users first field would be id and it would be auto implemented second we will name it as name 250 email this will also be backer third one would be phone variable characters since people can enter the plus sign to enter the country codes and finally we will have our blood group and let's create our table here well as you can see this is a structure of the table and the table is created now when you click on browse it will show you the data in this table itself since we haven't entered any data yet it is blank now let's open up code editor and create a file connect dot php and let's get started now here we will have to enter the name we gave to a submit button and that would be submit now we will create a variable to create a connection and we'll be using the mysqli underscore connect function to do that [Music] here we will have to enter the name of the server since we our server is the locally hosted server so we will have to type localhost now the type of user that would be root now the third part is for the password since we don't have a password for a database it would be blank and the fourth would be the name of our database that is test one now we will also check if connection is not complete we will have to display an error connection field now in this if condition we will check if the entries in the fields of the registration form are null or not we will have to do the same for the second second one was sorry i did not enter the yeah email a third entry was 4 and our fourth and final entry would be the blood group i think we're done here [Music] now we will have to create variables to pick data from the registration fields in a registration page now this post will be picking data what will be entering here now here we will have to enter the name we have given here so for the name field we have given the name as name itself so we'll be writing it here let's copy this code and make the changes this would be email let us also name it email this would be phone this would also be born and last one would be blood group because i am naming these variables same as the name i've given because naming everything differently would just create confusion in your code now let us enter these details into our database now insert into sql command now this would be the table name users name email [Music] now we will have to send the respective values that would be the variables that we just created so first would be name second would be email phone and blood group now that we have entered the data into the database let's create a query connect it with a command and give a message if it's successful or not enter successful else error okay let us close our php script here and save the code and let's see if it's working so let's go back to registration form and give some details to it so let us name sam sam at the rate mail.com phone would be one two three four five six seven eight and the blood group can be o positive well there's some error that we've experienced on line four okay let's see yeah we did not close this okay let's save it and try again another on line 12 what do we have here now okay so this is my sql i not mysql save resend the form and entry successful now the entry is successful you need to go to your database which i've shown to you earlier go to the table users and we can see the details present here sam sam at the rate mail.com the phone number and the blood group so now that we know how to create a database link our database to a html form and see the details into the database entered we can also delete these details from this phpmyadmin section itself so as you can see to delete this field i just have to click on this delete button okay and the field is gone also if you want to delete this users go to your database click on users and click on draw what it will do is it will drop the entire table and if you want to delete your database itself click on this database icon and click on drop the database now this will remove the entire database and all the tables associated with it now let's enter one more detail set of details to double check it let us give it mac mac at the rate mail.com that would be one two three four five six seven eight nine and the blood group would be a positive and the entry is successful so to check it we need to go to our database our table users and there we have it math mac address mail.com and the rest of the details today we are discussing everything about tread operators in php let's begin with the definition first crud stands for create read update and delete these are the four fundamental functions of persistent storage these operators are used in creating user interface conventions that help us to view search and modify data via computer based forms and reports basically the data is read built updated and deleted moving forward let me talk about the purpose of these operations one by one with the help of demo codes but first things first let's create a database to do that open xampp control panel and start apache and mysql now let's quickly open our web browser open the local host and go to php my admin section now let's create a new database and name it my db let's name the table users and we will have six fields in it the first would be id it would be integer and auto incremented since it would be the primary key the second would be first name type back here let's give it 250 the third would be last name variable character similarly next would be an email password and finally gender so now that our table has been created let's move on to the coding part now first we are going to create a file named config.php to configure the database now we will create variables and i will explain the use to you later this is the default username for a localhost now the default password for a database is empty since there is no password in our database and the database name would be my db that's what we have named a database now let's quickly create the connection using con variable my sqli command server name username password and the database name now this will create a connection for our database and now let's also check for errors while creating the database now if an error is found while connecting to the database it will show a message as connection field now let's end the file and move on to understanding the different credit operations now first comes create so let us also create a new file and name it create dot php now the create procedure adds the insert statement to create a new record now let's write the code for this now what this line will do is it will act as a link between the configuration dot php file and this create.php to connect to the database now we are checking if the submit button on the form is pressed now when the submit button on the form will be pressed the fields are required to be sent to the database for that we first need to create different variables similarly last name these are the names that we have given to the different sections in the table of our database password was password and finally gender now let's write the sql query insert into the name of the table that is users and now we need to name the fields we are going to be entering the details into since id is auto implemented we are going to be starting with first name similarly last name email password and lastly gender now these are the fields we are going to be entering data into now the values would be the variables that we just created which are getting the data from the form using the host function into the variables so first name similarly last name email password and gender so the code to enter the values into the database is complete now let's also execute the query [Music] to do that we will send the query using the connect and put the attribute as sql fields now if the records are created it will display a successful message else in case of an error it will show a error message now let's close the connection close function and move on to creating our html form [Music] now let's get heading here now this since this is a registration page let's give the heading a sign up form and create the form let's leave the action field as blank and the method would be since we're using post image [Music] now i'll just skip ahead with the sperm part now as you can see i've completed the code for the registration form which will include the first name last name password and gender now let's save it and move on to the next part that is the view procedure now the view procedure table records data based on the primary key noted within the input parameter now let's create another file named view.php for it and write its code now i will run the entire code in a single go and explain how these different operations are working on the web page now let's write the query to get the data from the users table from users now this will retrieve all the data into from the table also let us execute the query using connect query and pass and the php script and write our html code title would be view page now i'm linking this page to a bootstrap css document to make it look somewhat stylish since basic html page looks pretty boring but to do that we are going to be using the reference and i have added the link for the css file now let's complete the rest of the page heading to this division users now this will also display the id from a table so we are going to be creating a different set of column to display the id similarly it will be the same for the rest of the fields so i'll just copy this code this will be for email gender [Music] gender and action let's close it let's put it next time so this will check there is data present in our database now if there is data we are going to be fetching the same data if similar codes will be written for the rest of the fields so we will just let me just copy and paste and change the details first name last name email and gender uh these are the codes for the edit and delete commands and finally let us close the page now let's quickly move on to the third part update file and write its code now when the update button for the form is clicked we need this code to process it and similarly for the rest of the fields let's quickly change user id this would be id last name last name all of our variables are complete now let's write the query for the sql update name of the table users and set first name is equals to first name and similarly for the rest of the code now let's execute the query pass sql to it again if the record is a successful updation pass successful message and if any error is occurred we will give an error message for it now if id variable set in the url we need we know that we need to edit a record to do that we will again write a code using get method now we will write sql command to get the data and execute a query this is a very similar code to what we have written earlier to fetch the data if the number of rows is greater than zero you now what i am going to do is i am going to also skip ahead for the code for this update form now this is the code for the update form and now last but not the least we will create the file for delete and write a code very similar to how we have written the rest of the quotes let's write the sql query the same old routine so as you guess i'm going to be skipping ahead with some of the parts some part of the code now this is the code for our delete.php file and now we will save all these files and go to a browser and try to run check if they run correct now let's open the localhost first and go to phpmyadmin and open our choosers field here so as you can see i've already created a record here i'll create another one to show you how for that let's go to localhost demo and go to create.php so second record let's name it mac x simply learn b now the email would be map x at the rate simply learn b dot com password and submit new record created successfully now let's refresh it and as you can notice we have created another record here now let's go to localhost again and what was our next operation for crud it was c create our read that would be view dot php now view.php displays both of the records that we have saved in our database now these number differences would be because i have created and deleted two more records before recording this part of the video now let's go to edit section of any of this record so as you may notice it opens the update.php file user update form also the thing to notice is that it refers to the id that we are updating in the url itself now since we clicked on the edit part of the first field it is updating the first field itself now let's update it miss xxx abc at xyz.com and update record updated successfully now let's check the record and yes the record is updated now since we are done with the two parts create read and even the third part update cru now let's move on to the d that is delete let's go to the delete for that we would have to go to the view dot php itself now let us delete this second field mac x simply learn b macx addressing lnb.com delete now you may notice the urldelete.php id 4. now id equals 4 is deleted from the database let's check and yes the file from the database has been deleted so this is how we perform our credit operations with the help of php and mysql database today we are going to have a video session on php form validation so what does this actually mean okay well let me give you an example here so when you try to create an account on facebook or instagram you submit a form and then that form is cross verified with the code written in the backend so today we are going to do the same process in this video now we will have a look at two demos now in the first demo we will create a form and in the second one we will validate it so let's get started with the first demo but first things first let's quickly open c drive xampp folder htdocs and create a folder let's name it validation and open our code editor here and let's create a first file form dot php now i am going to write the code for the registration form this now here what we are doing is we are creating the different variables for the form and we are setting it to empty values let me put that in a comment too you now as you can see the form will contain full name email number comment gender and age now for this demo the username email and mobile number fields will be text input elements while the comment field will be a text area let's write the next rest of the now we are defining the test input function which we are calling in the above if statement this let's start creating the form and add the method to post action would be you um okay so i skipped ahead and created all the details required in the form so the details would be full name its input type would be text uh just yet okay now second would be email similarly number age comment now notice the comment would be a text area instead of a simple input type gender and a submit button now the form is complete we have to write another php script to display the details i'll just skip ahead in this part too so now that we can display all of the variables from the form let's close the php script and also close our form now let me explain some parts of the code to you before we move on to the web page part so here we have post so this function is used at the time of form submission now during that time the form data is sent with method equals to post second would be the server section now this server php self is a global variable that returns the file name of the code now also html special characters function converts special characters to html entities now this prevents attackers from exploiting the code by injecting html or javascript codes that is cross site referencing scripting attacks in forms so now that we know what these functions do let us jump and see if a webpage works okay for that first open sam control panel and start the apache server and now let's open the browser and type localhost followed by the folder name that would be validation and then a file name form.php so yes the form looks good let's add some name to it email xyz.com number is optional but let's add some number to it it would be 20 comment would be hello welcome to simply learn gender would be male and let's click here yes so our input is visible and the form works perfectly now let's move on ahead with a second demo that is validating a form now we will be writing a code but with slight variations now the fields like full name email address and websites will be added here and these three fields will show an error if an incorrect input is given now however the code is validated against the input and returns an alert message if an incorrect data is entered let's go to the code editor and create another file and let's name it validate dot php and write another code for it [Music] now i've added some color for the error that will be shown into the form again let us write comment for it define variables and set to empty our variables would be name err that is error similarly email here gender trr and the rest of fields so foreign i'll skip the else command for it now if no error found or the field entered is correct the name will be displayed as we displayed the name in the form.php file with the help of post name now what we are going to do is now we will check if name only contains letters and white spaces you you and this would be er now we will check if the email address is well formed or not to do that we will again use an if statement i think i have used emi somewhere since it's showing here emai so let's check before it throws an error in a code there's email yeah okay we made a mistake here so this else was not supposed to be closed here let's move it ahead yeah i think this looks good let's write another code for another variable that is website and do the same thing again now we will check if the url address syntax is valid or not so just be assembling you you now we will write the test input function as we did in the form section so let's just copy it from there since it's going to be the same now let's write the php script for the form validation section this method would be post action would be php script again you i'll just skip ahead with this part of the program so now that we have our complete form here let's close it as you can see we have entered full name email address website comments and gender parts to the form now let's write a final php script to display the details now since this will also be similar to the last part we will just copy it from there and make the necessary changes so [Music] what we don't have is full name this would be just name email and this would be a website there's no number it's deleted there's a comment and there's a gender let's close the script and also close our web page now let's save the file open a browser and check if our web page is working correctly type localhost the name of the folder and the name of your file okay so let's write something mac mac xyz now let's not write something after it so that the email address would be wrong just to check one two three dot c comment anything would do gender mail and let's click on submit so as you can see it shows enter a valid website url and the email address is incorrect let us also check by writing an incorrect name that would be mac1 email address mac xyz at the rate and one two three dot c now it's showing the error for the name too okay let's write something that is correct mac address gmail.com website would be www.simplylearn.com comment could be anything mail and no errors here as you can see we have got the output in this video we will learn how to create a registration page using php html some css and xampp software then we will use that data and store it in a mysql database so let us begin and start writing a code first now to do that we need to go to my computer c drive now zam folder this is the folder where our xampp software is installed here locate to htdocs and let us now create a folder for our tutorial and name it tutorial now we'll open this folder in visual studio code and start writing a program so let us create a first file here and name it register dot html now this will be the html file that is the whole structure of how a registration page will look now registration page now this will be the title of our web page i think that's enough now let us move on to the body of the page now i'm going to write register in an h1 point for the heading and now we'll create a form action would be the name register.php and method or tree post okay so the first label that i'm going to create will be for the username so in a registration form i'm going to keep it simple i'm just going to include three categories that would be username password and a third one would be email so to create the label for username so you always have to keep in mind whatever name you're giving here or in the database whichever you write first since the name has to match so i'm giving username the name username and that's it for a label now let us create another label for before that input type for this will be text name as we've already written will be username placeholder with display username and i am going to put this field as required which means that the user cannot leave this field empty second one would be label for password now i am going to give its input type as password and you'll know the reason later you can also give input type for the password as text but it will not be secure then password id will be password and this is also a required field now let us move on to the label for a last section that will be email and give its input type email yes and email can be set as an input type name email placeholder will display email and you guessed it right this is also a required field i think this is it for the registration html now we move on to creating our css page in order for this html structure to look good well wait a second i left off of a pretty important section of the registration form that is the register button itself so let me just not form let me just create the registration for registration button and will be of type submit and value displayed would be registered we'll move on to creating the css file and let us create a new file and name it style.css so the code for style.css is already prepared so instead of writing the entire code line by line i'm just going to paste it and you can see how it works so this is the css code that will make a registration form look a little better so i have created different sections for different sections of the registration form so this will be the registration from input button this is for the color of the submit button and the rest of the form as you can see now in order for the style.css file to work we need to link this file style.css to register.html now how do we do that we go on to the register.html back and we add just one extra line in the head of the program so here what we are doing is we are referencing our style.css page into this page itself now that's it now both of these pages that we've just created are linked to each other and now at least a registration form structure is complete it does not work yet but it will soon now before creating the register.php code let us first create a database so that we have some understanding of what is going on around everything so to create a database what we need to do is open xaml start the apache and mysql server now go to your browser and open the localhost phpmyadmin now create a new database let us name it form click on create now let us name our table as users number of columns would be four the first column will be id which will be auto incremented second will be username make sure to use the same name that we've used in the code so that the code does not malfunction it will be of type variable character password will also be a variable character email and now so as you can see this is the structure of our table of database form now let us move on to finally writing the rest of the code for our registration form so now that we have a database complete let us move on to our back to our code and create the register.php file now the first thing that we need to do while creating the php code is we need to connect our code with our database that we just created so this is why i stopped in between and created a database so that you need you understand better how this code is functioning now database host since we are using sam to locally host a server this will be localhost a user will be the root user since we have not set any password on the database it will be empty and finally the name of our database what did we name our database it was form now i will create a variable con to connect to connect a database with our code so we have created host user password and finally name now we have got to add an error message which will check if the database is connected or not so will be [Music] error connecting to the database now let us add some code to check if any variable is empty or not okay okay now if any of the field is left empty while filling the registration form it will display the following message empty field now let us add another if code and check so now that we have added validation into a code now what we need to do next is check whether the username or the details that have entered that the user has entered the registration form already exists or not and if it does display an error message and if the details are new enter the details into our database now to do that let us write another if statement now here i am writing an sql command which will select id password from users that is the name of a table where username and here we are going to check if the username entered still exists or not now if the number of rows is greater than 0 which means username already exists so we need to display an error message that would be username already exists try again and if it does not now in this else part we will be writing the code for to send our data into the database now here instead of selecting we are going to insert the data into users which is a table and the fields will be username password email and that's it now the password variable is going to fetch the details of the password field you and email add another statement to execute and display another message now since we have entered data into the database we need to display a following message too this would do now [Music] this will display an error message in case something goes wrong and now since we have completed this part of the code let us end a statement you close the connection with the database here and end our php script so now that our code is complete now let us run the code and check if it works fine so our apache server is running let's go back to a browser open the localhost name of the folder so as you can see register pages are visible here register.html and create a user tony at the rate aaron and dot you have successfully registered and you can now login so let us now check if it's visible in our database so our database is forms users and as you can see the file that we just created tony is visible here in a database along with the email and one thing that you may notice is that the password is not visible here since we use the hash protection for passwords so passwords will not even be visible to the database admins so this is how you create a registration form with the help of html php exam and mysql database in this tutorial we'll create a simple login system using php and mysql now this tutorial is comprised of two parts in the first part we'll create a login form and in the second part we'll create a local form also we will show you how to create a database in order to access the login web page as well now first things first let us quickly go to c zam htdocs and create a folder let's name it demo and quickly open our visual studio code now for this tutorial we'll be creating a set of files for different functions now there will be six in total let us first create these files and we'll write the code later now the first file would be index.php now this is the file that will be responsible for the login page where we'll enter a username and password to login now the second file would be login.php now this file will be responsible for how our login system will work similarly there will be a logout file that will be responsible for how our logout function will work next would be home.php now this is the file for our home page when we login into our account next would be a file to link our web page to the database that would be database connection dot php and finally we'll add a css file to make the page look better now let's get on to writing a code first let's begin with index.php now in this page we will create the login page let's add the title as login now here i am going to link this page to the css file that we are going to write later now in this reference we'll refer it to the style.css file we created let's create a form now since login.php is responsible for how our login page will work we will link this index.php to login.php method would be post let us add a heading login now this part of the code will be checking for error and displaying error if something wrong happens now we will add our username and password fields let's add another label for password input type would also be password now let us add the login button it would say login and our form here now our index.php code is complete now let's move on to login.php and write its code now what we are going to do is we are going to connect this page with the database page now here we will be validating the data entered in the form let us create a variable for username and password make sure not making any spelling mistakes otherwise you will run into errors [Music] now what this code is doing is it's checking if there's an entry in the username and password field and if it is empty it will display the message as username is required similarly what we are going to do is we are going to create an elsif that would check if the password field is empty and display an error message in a similar way now that is set up let's import our data from our database now we have not created the database yet but we'll write the sql query and we'll create a database later now what i'm going to do is i'm going to name my table as users so here i am writing select star from users where user name would be the value we passed and similarly password would also be the value that be passed now this is where if the password and username match with what we have in a database it will display a message as logged in now we are going to create a session that would be a login session now id will also be a field in a database that would be auto incremented and work as the primary key okay if function is complete time to write the else part now the else part would be if the username or password you have entered does not match with the one we have in a database so it would display incorrect username or password as the error message location will be same index.php so now we have our login.php file also complete now let's get on to our home.php file and quickly write the code for it we will start the session now this would be our home page let us also link it to the css file tile dot css now with this php script we will display the username of the person that's logged in so suppose my username would be mac so it would display hello mac we will very soon see the practical demo for it too now we will link this home page with the logout session that is logout.php and end this okay so home.php is also complete so next would be to work on the lower part now this is a very small code since it is only working to in any session that has been created now first unset the session and then destroy it now can you guess the location it would be index.php now see this is all the code for the logout file now finally we will move on to database connection file where we will connect our entire web page these entire four files to the database so we are going to create variables for let us name it since we have already used unnamed for username now this is the name for the server and since we are hosting a server locally it is localhost now the next variable would be for the name of the okay let us let us change the spelling this would be name of the default database password would be blank since by default there is no password and this is the name of the database that we are going to keep now let us keep the name of our database as test underscore database now we will pass the variables that we just created now we will check if the connection that we have created is working or not and if not we will display a message as connection failed now all of our files are complete the only thing left is style.css now since style.css is only for the looks of the of the webpage and is not a very necessary file for our login function i will just copy paste the code that i have already written and let us now move on to creating a database now to do that first open zamp control panel and go to your browser and type okay localhost go to phpmyadmin and click on new database now the name that we wrote for the database in our code was test underscore db so we will have to name it the same here too database has been created the table name would be users number of columns would be three the first column would be for the id and it will be auto incremented now id will act as also the primary key for this table second would be user name 100 would be okay and the third would be password now as you can see our table users has been created with id username and password now let us open our login page now this is our login page so to login we first need some credentials in the database now we don't have that kind of time to go on and create a registration page for it too so let us just manually add one or two records into the database from here phpmyadmin itself so now what we are going to do is we are going to this insert section and under the username let us type mac and password would be one two three four five so let's go back to browse and as you can see we have our credentials here map password is one two three four five so let's add just one other simply learn its password would be a b c d e and yes so we have both of our credentials now now let's go to the login page and try to login with the credentials that we just created so okay let us first enter our wrong password to check if our error messages are working correctly yes absolutely so it's showing incorrect username or password since the password i entered was incorrect now let us leave this username blank enter some random password so it is showing user name is required so a program is working perfectly now let's enter the correct credentials and yes so this is our home page and it is showing hello with the username that have logged in mac and now we have got that logout button which will end this session and take us back to the login page now let's try to log into a second account and hello simply learn we will learn what is rest api with php now let's get started now suppose you want to create a weather app for weather forecasts in your area now to do that you have to set up a supercomputer and a satellite to monitor the real-time weather but i wish everyone could be that rich now for those who cannot afford the setup you can get the same information from an existing web service using an api now an api acts as a medium between a web service and your application which helps you communicate your requests with the service and get a response so in this video we'll be learning about what is rest api principles of rest api how does a rest api work and finally creating a sample rest api with the help of php now let's move on and see what exactly is res api api stands for application programming interface now api is a set of protocols which acts as a medium of communication between programs in other words it is a way to programs talk to each other now let us understand this with an example suppose you the client go to a restaurant to eat now here the restaurant is supposed to be the server how do you communicate your order to the kitchen here the waiter comes in the picture now here the waiter acts as a medium between you the client and restaurant the server to send your request to the kitchen and get food in return as per requested this is exactly what an api does so now that we have an understanding of api let us look at what res means in rest api now res stands for representational state transfer it is an architectural style which defines a set of protocols of how an api is written now rest follows a set of principles for the design and development of an api now it is a very efficient technology as rest takes less bandwidth over similar other technologies so now that we know what res api is let us move on to understanding the principles on which a rest api is designed now the first principle is client server the second stateless third cacheable fourth uniform interface fifth layered system and sixth code on demand now let us understand these principles one by one client server a res api design works on the concept that the client and server should be isolated from one another and develop independently this helps in increasing manageability across various platforms stateless now according to this principle res apis should be stateless which means calls can be made independent of one another also every request sent from the client to the server must include all the info needed to comprehend the request cachable this principle states that a rest api should be able to hold cacheable data the data in the response should be indirectly or directly categorized as cachable or non-cachable uniform interface according to this principle there should be a uniform interface across all devices and platforms for the interaction between application and server layered systems now res api's architecture includes several layers that operate together to construct a hierarchy that helps generate a more scalable and flexible application due to the rest api layered system the application has better security as components in each layer cannot interact outside the subsequent layer moreover it balances loads and offers shared caches for stimulating scalability now the last code on demand now this is optional but this principle allows for coding to be communicated through the api as executable code to the client to be used within the application we now know on what principles an api is designed now let us see how an api work now res api makes use of http methods to implement various tasks based on the client risk request so the http method uses grid to perform various operations on the server crud here stands for create read update and delete now in case of http methods post method is used to create get method to read data put method to update it and delete method to delete data so i hope you have some understanding of what risks apis are principles on which they are designed and how do they work now let us move on to creating a sample risk api with the help of php so first let us open the xampp control panel and start our apache and mysql servers now what i'm going to do is i am going to create a database for my api let us name it api and let us name the table as users it will have four columns first one would be id integer and it will be auto incremented the second let us name it as name [Music] third would be age and finally email now name would be a text and email will also be a text let us quickly save this and now we have a table for us now let us add some data into the table so mac age would be 21 email would be mapped xyz.com now let us create another entry name could be simply learn age 30 email simply learn xyz.com now as you can see we have added two rows with the data that we just entered now let us move on to the visual studio code and see zam htdocs and let us create a new folder let's name it api and open with visual studio code let's create a new file let us name it tutorial [Music] dot php and now let's start writing our code now first what i'm going to do is i'm going to connect my database with this code now since the database is locally hosted it will be local first root since there is no password this field has to be empty now what was the name of a database that is api that is what we have to enter here now this is a variable to get the response from the server for the database okay there's something wrong now it seems like my opening curly braces key is not working so i had to open this on-screen keyboard we don't need you right now now let us create another variable named sql now this is select this command will select all the data from our table users users again we are going to need the curly braces what i am doing here is i am creating a variable as a counter and i am going to give it a value of 0. now let us create a while loop and in this while loop i am going to fetch the data and display it in json format uh now we are going to write the names of all the rows that we created in a table i'm just going to copy paste it otherwise we'll have to use this on-screen keyboard again and again second one was named agent email now what i'm going to do is i will plus plus the counter now to display it as an in json format we have to write json code with the response error message and now let us end the code let us go and quickly save our code open a browser go to the localhost api this is the fold that we created now as you can see our tutorial.php is visible here and when you click on it you can see the data from the database being extracted with the help of api in json format in this video on php web development we will learn how to create a website with the help of php we'll also be using html css bootstrap and mysql in this tutorial so get ready to create your very own website now before we get started with the step-by-step tutorial let me give you a glimpse of the website that i'll be building in this video so let me just quickly go to my browser and type in localhost followed by the name of the folder where i have created the website so i'll be making a photo gallery website like this so in case you're a photographer you can build a similar website in order to showcase your talent and if not you can always create your own personal website for anything you're passionate about so without any further delay let's get right on to a tutorial so first things first let me show you the environment that we'll be working on while creating a website so we are going to be needing two softwares that is visual studio code that we'll be using as our id the code editor and the second one would be xampp now zamp is a web server solution package which we generally use in order to manage a database and create a local web server you can download it from these respective websites since i've already downloaded downloaded both of these softwares so we'll be skipping that now let us begin so after that you've installed both of the surface just go to your c drive locate xampp folder and inside the jump folder look for htdocs and inside this htdocs name a folder you can name it anything i'll be naming it photo since i'm creating a website regarding photos and then right click inside this folder and click on open the code so this opens up our visual studio code and as you can see our photo folder is visible here now also one thing that we need to do is go back to this photo folder right click and create two new folders first one would be css so it's considered a good practice even if you're using a single just a single css file it is considered a good practice to create a separate css folder inside your project folder also create another folder and name it images so this is where we'll be keeping all the images for the website so let us go back to visual studio code so as you can see both of these folders are now visible here now go on and click on new file the first file that we are going to create is index.php and inside this index.php will be writing the code for the main page of a website so let us start first click on an exclamation mark and as you can see a block of code already written is visible here now so we just need to add a few things first let us put the title the title would be of course go to gallery next up we need to add a few links to our webpage in order for it to function well so the first link would be this is a link to link this page to bootstrap you can also easily find it on the internet or you can just type in from here let me just go to the browser to check if this link is working yeah seems fine to me now we are going to add another link to it now this link will be for the link for a css file that will be creating later on since we'll be putting that css file inside a css folder i am going to link it to style.css so that's it we are done for the first part of our code now let's end this head section and move on to the body section of our web page so inside this body section what we first need is to add a few scripts for our page which will be responsible for the design of our web page so these are the three scripts that i'll be linking to a webpage you can just look and write them as it is also keep these three scripts at the end of your body so any code that will be writing inside body will be above these three scripts now let's design the webpage so the first thing that we'll be needing is a navigation bar in a web page so let us quickly go to the browser so instead of writing an entire big block of code we can just copy it from the internet so bootstrap provides it you with many such designs so what we are going to do is we will type a navbar bootstrap and hit enter so as you can see just scroll down and as you can see this is the navigation bar which this code will display also there are different navigation bars according to your need along with the code so you can just copy any of the one you like i'm going to be copying this one click on copy go back to the code and just paste it so now what we have here is our navigation bar ready so let us go to the browser and check how does our web page look so after the local host what we're going to do is we will write the name of the folder in which we are writing a project which is photo well there seems to be some problem since this nav bar is lacking the css design let us go back to our code and see what went wrong well yes this css file that we linked here after css there is not a dot but a slash i think it should work fine now well the problem still persists let me go back and recheck well yeah i've made some spelling error here this is bootstrap not board strap and let us go back reload and yes as you can see our navigation bar is well and good let's go back and make some changes to a navigation bar the first change that i'm going to be making is i will change the color theme of the navbar to dark not mark go back every load and looks better now here go to gallery good also since i'll be using the drop down menu it is absolutely up to you if you want to use it or not since i'll be using it i'll just change the name to categories and the three category will be the first is nature photo photographs the second would be architecture and the third would be travel so let's go back refresh categories nature architecture and travel so this travel looks a little different from this nature and architecture so as you can notice this this line that is dividing this section to this section so let's go back so that line comes from this part of the code so we'll just copy and paste it here looks good now that we're back we don't need this disabled and the search bar so i'll be removing that particular part of the quotes and this form2 go back to the browser refresh and all of the parts of the navigation bar that we don't need and now have now been removed also this link would be for about section of the web page and we will also add another section or another link that would redirect us to the contact part of the webpage so to do that to add another link we will just copy this code and paste it and instead of about this will be contact go back refresh home contact about categories so this categories should come before these two so what we're going to do is we will just copy this section of the code and put it after the drop down menu right now go back refresh until we copied it instead of cutting it so it's now visible twice reload home categories contact and above looks perfect so you see now that's the beauty of building a website you don't have to write the entire code by yourself there are codes already written for all these kinds of stuff this navigation bar the carousel that i'm going to be using in the website the blocks of photos that we are going to display on the web page and a lot of design templates you can call them have already been written for you to use them instead of wasting your time and writing the entire long blocks of code now next up what i'm going to do is i'll just go back to our photo folder and inside this images i'll just copy the images that have already downloaded copy go back images and paste it here so now that we have our photos inside the images folder let's go back to our code and write a carousel code or just copy it from the bootstrap go back to bootstrap here look for carousel so as you can see this is what a carousel looks like so a big photo in on the front of your web page as you already saw when i showed you the website these are the different types of carousels available on the bootstrap website you can use any of them so the first one is just a single photo second one is slides of photos third is slides photos with this marking and the final one would be all of them combined with captions so of course we'll be using the final one so copy the code for the final carousel or whichever one you like and go back to your code and here after this navigation bar paste your character code click on save go back and refresh so since we haven't added any images here there are none visible but you can see this carousel has been added to our webpage so let's go back and now we are going to add the images that we just pasted in this images folder so in this carousel code look for image src so this is the location of the image that will be displayed so type in images that is the name of the folder from where you will be picking up the images for slash and let me just go back to this images architecture 4 yep so architecture 4 in this alt type in architecture and here is the heading so this is part of the caption of the carousel so i'll be writing okay texture here and i'll make this heading a little bigger it's three i think h3 would do and i don't want to add any more descriptions if you do you can write all of that inside this paragraph but i won't be so i'll just remove it from here i'll do the similar with this so what we're going to do is we will write images slash and go back what image i'm going to be adding nature 4 would do nature or type in nature similar to what we did above h3 h3 remove this and now here the last one would be travel h3 h3 and let me just type in the travel 5 travel pipe and in this alt type travel and we are good to go okay let's reload and voila so our images are visible here with this beautiful carousel and you can forward them and well does this not look beautiful to you so architecture nature and travel but as you can see we have some problem here the images are way too big to fit on this part of the screen and it's going all the way down and this part of the carousel is not visible on the main page when someone opens the website which absolutely does not look good so what we're going to do for it now to fix this what we're going to do is we will go back to our code editor inside the css folder we will create the file that we linked at the start of our tutorial style.css and here just write this code margin 0 adding also 0 and box sizing would be border box so now to display the images on the just on the main page of our website what we're going to do is we will put a dot go back to the main index.php and from here copy this name of the class carousel item go back to style.css paste it here carousel item and type img and inside this we will define the width and the height of the image so the width would be 100 and we are going to keep the height at 95 we h so that it does not go beyond the webpage let us quickly save it go back reload and yes it looks great and it's also visible on our screen now now next up what we're going to do is we will be creating different sections on this very webpage for the different categories that is nature architecture and travel so go back to the code under this carousel code let us start writing our first section that would be section plus so i'll be using my 4 and pi 4. the first div so what we want is we want the text to be in the center of the page so the class would be text center and the first category is nature now the next thing that we need to do is we need to add the images to it so how do we do that also we are not to display a single image on a on the entire webpage what we need is we need to display small three blocks of images in a row so we need to create another div class and inside the class we will define the column for large systems for the mid ones and for the mobile devices so after you've written this class after you've written this div the images doesn't matter the size of the screen only three images will be displayed on a large and middle screen and a single image will be dis visible when open on a mobile phone so all in all your website will be very responsive to all the devices that you will be using let's just close it and inside this tip what we're going to do is we will link our image and the image would be since this is nature let's use nature one which image would give we have already used in the carousel nature 4 so let's skip that and put the class as fluid and padding bottom padding would be three well i think it's done so this is the first section let's go to our page refresh so nature and our first image is also visible here so what we need is we need to display two more images in this row go back and it's now all copy and paste just not this part this part of code copy paste and paste so now nature to and nature three go back refresh okay there seems to be a problem here let us figure out why this is happening okay we forgot to add the road if and without the road if the images will not be displayed in a row but of this so container fluid i'm using this since just a second let me paste it here yeah and we will create another div named row and our entire code will go inside it and we'll paste it let's go back and check if it changes anything and it does so our images are displayed perfectly our first section that is nature for our categories is complete now now next what we need to do is i think you guessed it we just need to copy this section and paste it twice since there are two more sections so after the first section in the second one would be for architecture the images we need to change architecture 1 architecture 2 and architecture 3. yeah refresh nature architecture and well nature again because we did not edit the third part of the code so the third part of the code will be for travel let us quickly add the images so travel two travel four and i think we use travel five already so travel 6 and go back refresh and travel images architecture and nature so half of our website is already done guys now what we need to do is we need to create two more sections for the contact and about so for the contact part of the webpage we'll be needing a form that we will then go on and link to a database that we'll be creating later on and the about section will be responsible to give some information regarding the website regarding the photographer that have uploaded the images so let's go back to our code and move on to creating another section for the contact so wait let me just copy only this section of the code and of course we'll be needing a closing tag this will be contact us and let's create another div class would be 50 and m auto so why i'm doing this is because inside the contact will be creating a form where there will be columns and to manage the width and margin of these columns i am writing the class for it inside this tip we will write a form inside the form the first thing that we need is action and the action for the form will be about dot php this is a file that we'll be creating later on and the next thing is method which will be post let's close this create another div class named form group okay from group close it inside this i'll write a label that would be name this will be our first column input type text of course let's give it a name so this is very important so the name that you're going to write here should be matching should be matching with the name in the database and class from control now just copy this paste and paste so the second section would be for email type will also be email name will also be email third would be for the number let us keep the type text in case someone wants to enter the sud codes and let's go back refresh check contact us the fields are visible now what we need is a submit button so after this step let me create a button type submit class so this will make the button look green adding some css and the button would be called submit go back refresh submit button is here now let us also create a section for the about part of the page and then we'll move on to making our database so to do that what we need to do is we'll just copy this section for the about paste it here close the section and here let's start writing the code the class container fluid so why are we using this container fluid class is because sometimes when you don't use this class the images or text from your webpage tends to create so you can see a scroll bar here vertically it tends to create another scroll bar horizontally which we don't want so container fluid close the step inside it let me create a class text center it will say the name mac we just give some space and write a paragraph with a class of course text center otherwise if the text will start from the extreme left it would look weird and close it let's add some bold and right let's see i am passionate photographer interested in working architecture nature and travel photography next would be um a full-time freelancer with an experience of five years well i think this would do refresh oh we did not change this we'll just get right on to it contact us i'm a passionate photographer interested in working architecture nature travel photography freelancer and all of the things that we just written about mac we just need to change this to about and i think we're done yes so our web page is almost complete guys now we need to do some changes or add some things so the first thing that we'll be adding is an about.php file and inside this about.php file we will be creating a connection with our database and fetching the data from it or sending the data from our form to the database so before that let's go back to the browser type in localhost followed by php my admin click enter but before that you must open xampp control panel and start the apache server and mysql server since i already did i did not show you the steps so after the mysql server has been started you can see this phpmyadmin panel and from here we can create databases so inside this phpmyadmin click on new and let us name our database as graphy click on create now what we are going to do is we will create a table where the data will be stored from our form let us name the table as users number of columns would be four the first column would be course id which will be auto incremented the second column would be name type variable character 250 third is email also variable character 250 and the final was our number variable character 250 and click on save so as you can see the structure of our table the table users has been created inside the database photography now we need to go back to our code and write the code php code to connect our form to this database so first variable that i'll be creating is con to connect the database since a server is locally hosted the name of the server would be localhost root that is the default now if connection so this if condition will check if the connection is successful or not and if successful display connection successful next also add if the connection is not successful we should always have an error message connection failed next what we need to do is we need to mysql i select underscore bb and inside this we need to mention the name of our database which is let's just go back and recheck photography because the name is very important if you mess with the name the entire code goes away now let me create some variables which will fetch the data from the form in order to send them to the database so let's keep the same names so that we don't create any confusion email and of course number post so now that we have our variables we need to run a query so since we are fetching the data from the form and inserting it into a table we need to run a query for insert into the name of the table that is users and then name email number followed by the values that we'll be giving them so notice this is the name of the fields that you've given in your table and this these values are these variables that we've just created so inside it name second would be email and third would be number i think the query is done now to check if it works we will run another query and i am going to add a header file here because once you click on submit button let me just go back so if you click on submit button here the page will redirect to a different page which will just display connection successful we don't need that we need to stay on this page itself so in order to do that i am writing this header file with the location of index.php enter and i think we are done here now let's go back and add some details mac mac add to it simply learn.com number would be one two three four five six seven eight nine zero click on submit go back to your database click on browse and if the connection would be successful you can see the data here and we can mac email and number that's great so now let's move on to the final section of the website so how do we make this categories navbar work well it's pretty simple we just need to redirect to a section of a web page whenever clicked a button so when we click on nature we need a web page to be redirected to this section so let's just go back to our code and what we're going to be doing is we will create links just a second for every section of our webpage so let's go back to the first section that is nature and here right give it an id so the id for this section would be nature close the tag cut and paste it here so as you can see this id this section of our web page is enclosed in this id so now with this a tag we can refer our this section of the webpage to any button similarly we will add another id here so the id would be architecture of course make sure the spellings are correct put it after the section now go back a id this would be travel okay just a second cut it paste it here again what i'm going to do is instead of writing it again and again i'll just copy it from here paste it since this is contact us let me just put click on tactic contact yep and the section right and this will be of course about yes good now what we need to do is we need to refer these sections with the respective ids to the buttons go back to the navbar code on your webpage so here is a navbar code so inside it you can see after every button there's a reference you just need to add the name of your id do not remove this and architecture travel contact and about let's go back refresh click on categories okay what happened here okay no nature yep travel yep contact about so everything works perfectly now so while we're added let me just okay let me first show you um rob [Music] click on submit so as you can see whenever you click on submit it redirects you to the front of the webpage i don't want that yeah the database is working so just go back to the about.php and here we added the header location index.php so it is redirecting the code to the start of the webpage what we need to do is we need to redirect it to a particular section that is contact so just add contact in front of it save go back scroll down tony tony [Music] stark industries.com one two three seven seven seven seven seven seven click on submit and as you can see after you click on submit the page does not go back to the starting it just stays here while the data has been submitted to our database now that we have completed our website a quick question for you guys if you were asked to create a website based on your interest what would the website be about let us know in the comment section below now let me show you a glimpse of the website we'll be creating which is called techbyte.com but you can obviously create a website for the product of your choice so let me just go to the browser type in localhost website and this is the website that we'll be creating this is a very basic website for e-commerce services but as you can see we have displayed the top products on the front page of a website and here from the drop down menu you can see laptops and phones so without wasting much time let's get started now before we begin let me tell you that we'll be using visual studio code as the ide our code editor and zam as the web server solutions package which will be hosting a local server server for the website now another thing that we need to do before beginning is we need to go to a browser and type in bootstrap download go to this website and from here download the bootstrap file this will be a compressed file you can download it from here and i'll tell you later what we're going to do with it now let's go and set up a coding environment so let me just close this go to c zam folder locate htdocs folder in it and create any name for your project i'll be writing website and inside this website what you're going to do is go to your downloads now this bootstrap folder that we just downloaded we are going to extract it inside that website folder so let's just go back so we need them outside delete this so as you can see we have got a css and js folder and we'll be using this in a website now let us begin our code so right click open with code now this is our visual studio code and as you can see our website folder is visible here and from here we can create a new file so our first file would be index dot php now let's start a code type in exclamation mark and hit enter and you can see this block of code will be visible here now we need to add a few things well not a few quite a lot first would be title the title would be well since my website is take by i'm going to keep the title as take by next what we're going to do is we are going to add some links to this index.php so these are the links for the css files present inside this folder that we just downloaded from bootstrap and we'll be linking some of the files from this folder onto our website so that the website looks good now the reference would be css this is the folder and the file is bootstrap dot m i n dot css so this is the first file that we're going to be linking next let's add a script here so this is a pretty popular script and you can find it on the internet easily checks well yeah this ends a script here let me just recheck if i typed it correctly yeah seems fine now moving on we are going to be adding another script that would be javascript and it will include boots jquery sorry bootstrap i'm just going to find it bootstrap dotman.js here this ends the second script now let us just end this title and move on to the body part of the code now what do we need to produce or create first now the first thing that we need is a navigation bar so to create a navigation bar i'll give you a pretty easy way to do that instead of writing a hefty big code you need to go to your browser since we are using bootstrap why not take the best out of it now type in bootstrap navbar go to this link navbar bootstrap and as you can see this bootstrap this navbar can be accessed using this code just copy it go back and paste it in your body now we'll be making a few changes to a navigation bar according to our e-commerce website but before that we need to check if this navigation bar is visible correctly on the web page now to do that first let's open a zam control panel start our apache server and go to a browser now to see the result of your code to see if this code that you've just written is how does it look on a web page we need to type in localhost followed by the name of the folder that you created for your project since the name of my folder is website i have written website here click on enter and well a navigation bar looks a bit weird there's no designing to it now let me go back to the code and see what i did wrong well yeah we don't need this bootstrap reboot.min.css instead we need just bootstrap.min.css let's save it go back and reload well our navigation bar is visible let's go back to the code and start making some for changes the first change that i'm going to be making is i will change the color theme of this navigation bar and yeah looks much better now let me remove some things first let's change the name to techbuyer.com well second uh let us let it be home so this is the drop down i will be changing it to products the first product is laptop the second one phones we don't need this here and let me put the divider in between we don't need this disabled part either and neither do we need the search form now i want to make a few changes to the navigation bar so this navigation bar seems a little thin let me add just a little bit of breadth to it yep looks good and as you can see laptops phones and this dividing line now what we need to do create a front page that is the top featured content on the front page that will be visible on our e-commerce website so to do that create a div class let us name it and this will be a column div inside this another dev class this will be for the row and now just a second yes this will also need a class since we want our text in the center of the page and top products okay let me just add some spaces well before adding those images and the products onto a page we need to prepare a little bit more so before that let us just save this piece of code and see how does it look so it displays top products in the center of the page looks great now what we need to do before we can display the products on this page is we need to create a database in where we are going to store all the information regarding our products and we will fetch that data from the database and displayed on our website now to create the database just go back to the xampp control panel and start the mysql server too now here type in localhost php my admin and you can see you are now redirected to the php my admin control panel where you can create different databases so as you can see i've already created a database named tech by under which i have got another table that is products with some data here now i'll show you how to create a database from scratch now to do that we need to go to this new part now since we already have a text by database let us name it something different e-commerce and create now we have created a database named e-commerce and inside the e-commerce what we need to do is we need to create a table let us create the table and name it products now our table with will mainly consist of around six or seven columns and let us keep it seven the first would be id of course and it will be auto-incremented the second title of the product which will be a variable character to 55 price of the product since prices can be in decimal let us keep this decimal and values would be 10 comma 2 next is brand name this is variable character 100 would do image now this column here will contain the location of the image on our server or on a system since our system is the local server so this will also be a variable character 255 next would be description this will be a text since a description can be long and last could be featured all right let us save this table and we have a products table here in our new database that is e-commerce now we need some images for this image file for our products now i've already downloaded some images let me just copy them now go back to a c drive zam what we are going to do is we are going back to our website folder and we'll be creating a new folder inside the website folder and let us name it images and paste your images here let me go back to this visual studio code and as you can see our images are visible here we'll be using them very soon let us go back to this and let me add an entry here so we'll be working with one product and once you understand the concept you can add many more products later on so the title would be google pixel 5 the price 65000 brand name goes google image now to add the path of your image what you need to do is you need to go back here images now the path would be inside website and inside images folder so website images and then followed by the name of the image since the name for my google phone is g pixel i'll be writing g pixel dot png make sure you do not make a mistake while writing a name and in the description well i've copied some description from the internet i will be posting the same here google pixel 5 5g 8gb ram 128 gb space now inside the featured part we'll be numbering it one and click on go so go back to browse and you can see your field that you just created visible here so now that we have the entry for our image for our product that is google pixel 5 phone in our database let us go back to the code to see how to retrieve this information from this database into a code and display it on our screen let's go back to our code and in our code let's go back to the top and here we are going to be creating a php script and inside that script i will be accessing the database now let us create a connection to the database using mysqli connect and inside this what we are going to do is we will be writing the name of loop the server since the server is localhost and then this next would be root now again mysqli now here select db database and inside this we'll be selecting a database from the my admin panel so what we need to do is we need to write the variable name followed by the name of the database that we need information from so our the name of our database was e-commerce yep so e-commerce so here we have created a connection with the database now let us create another file sql so for this this variable will be accessing all the information stored in our table products so we'll be writing some sql commands select star that is all the details from name of our table products let me just recheck products yep and the featured is equals to one so remember that while creating a entry we put this featured value as one so this part of the code is done now let us go back down where we stopped last and write our php script so here what we are going to do is we will be creating a while loop now inside while loop we will create another variable as products which will be equals to my sqli and this function is used to fetch the data from the database and feature well there's something that we missed we did not create the variable featured here and well it would have given an error so what featured would do is featured would use the connection to query the sql command now go back here what this while loop will be doing is this while loop will be fetching the data from our table under the category of featured number one so next what we're going to do is next we will create another div class which would be inside this h4 another php script is equals to product now inside this we are since this will be the title we will be displaying the title from here so what we need to do is we need to add the title and close the php script here next we need to display the image so here in this image src we don't need to write the path of the image since we have already entered that into the database what we need to do is we need to specify the path from where we need to fetch the image from the database so it's pretty simple again the same thing product and as you would have guessed it it will be image was it image or images let me just recheck it was image close this close the file and here we have retrieved our image now protect inside this product what we are going to get is the price title so that if one would hover over here it will display the title of the product and that's it we need to close it set okay so yeah looks good next we will display the price of the product to do that we will create a class let us name it rice close it rupees we're doing it again product and here what we need to do is we need to get the price and close this similarly whatever details that we need to display here from the database we are going to be accessing them through this script with changing the name of the column that we need to access so now that we have all this let us also create a reference page and i'll be creating another file details.php which will display the details of the product but before that let me create a button type button class button success now the name of the button would be more and well this ends here also what we need to do is we need to let me just see what we need to do is we need to end this while loop and while here and just close it so this div and this div everything's good save let's go back and see if it's working and voila we have our first product displayed here on the front page of our ecommerce website google pixel 5 the phone the more button does not work yet but we'll be working on it but it feels good doesn't it now let us go back to the code and see how to create this details.php file first details.php and inside this file what we're going to do is we are going to just copy paste some part of the code here and also this part of the code okay and we don't need it now we need one or two more things to be displayed here so just copy this paste it and paste it again let's go back to [Music] our localhost and what we need to display here is so we have already displayed the title the price and the image so the things that we're left with is the description and the brand name so let's go back price is already here just add description and brand name was it brand name yep brand name description it's good change class name here okay so what we're going to do is we will be refreshing this page and clicking on more and well yes good the details of our product are visible here now let's go back and make a little changes so the first change would be this so this would be product details and save click and there's still a big gap yes looks better now let me just you can add some bold or italics or whatever you like in this code um what did i do so i've added bold in the title let's see if it works i'm not sure if it does okay since it's already a heading my bad let me add it here okay save it so this is the price and yes price is in bold now so you can make a few changes so look make your description look better and let us go back to the main page and what we're going to do is we are going to create two new files for this laptops and phones to display them separately when we click on any drop down menu since they don't work yet now let me show you an example to create a file for this product laptops and you can create the rest yourself so first thing that we need to do is we need to go back to this database into a table and create another entry so the title would be a source row laptop price would be 1 lakh 20 000 brand name asus image so the image is website images and the name of the image is broke asus dot png broke password and i've copied some description for the from the internet and now the one thing that you need to notice is we are going to be keeping this featured part as 2 instead of 1 and go back to browse and you can see the detail that we just created with the feature number 2. so now go back to our code and create another file let us name it dot laptops dot php let me just see yep i have so yeah i may have skipped this part so in the drop down menu when we created a navigation bar here it was written this so we need to replace this reference with the name of the php file that we just created that is product dash laptops dot php so pro duct dash laptops dot php and inside this first thing that we need to do is copy this code paste it here now here change it to two and drop down top products everything looks fine save it since the feature number will be two let us go back refresh click on laptops and here you can see the asus rogue laptop visible now let me add another product on our feature page that is a front page to show you how do we display more than one product with the same code so go back to this database and create another entry let's say hp laptop price would be 80 000 okay i think i just created an entry let me delete it go back hp laptop price 80 000 brand name hp image website images name of the image that is hp underscore laptop dot png hp underscore laptop dot png and the description which i have copied from the internet and in this feature we are going to be writing one since we are displaying this on the front page of our website go back to browse here are the details now let's get back we don't need to change anything just save it go back and refresh and as you can see we have our hp laptop visible here and similarly we can just re add products into a database and this single piece of code is enough to display them all on a web page so guys these are some of the basics of an e-commerce website you can add more products choices more detailed descriptions and add more designing using css bootstrap cards and buy sell sections on your website just play along with the code and start making your own web pages in this video we'll discuss some of the frequently asked questions in php interviews now the questions are categorized in two sections beginner and advanced questions so without any further ado let us get started with the beginner questions now the most basic question is what is php so php stands for hypertext preprocessor it is a server-side scripting language that is embedded into html and is generally used for dynamic web development phps also a very compatible language that is it also works efficiently with almost 20 different databases such as mysql post resequal etc next question what is a session in php now sessions in php are used to store data for users under a unique id which can be then used across multiple web pages of a website next what is peer in php now peer stands for php extension and application repository it is a framework and repository for the reusable components focus on reusable components of php containing code snippets and libraries next is php considered a case sensitive language so this is a very often asked questions in interviews so php is partially case sensitive since variables in php are case sensitive while functions and user defined functions are not next name different types of data types in php so different data types in php include integer float string boolean array object null and finally resource so there are total eight different data types that exist in php next question how is echo different from print now echo it can output multiple strings at a time while in case of print it can output only a single string now echo does not have a return value while print always returns one that is the reason that is echo is faster because it does not have to return a value while it is print is slower in comparison to echo because it always returns a value now as you can see both of these commands echo and print are used in the exact same way next what are the rules for naming a variable now there are certain rules which you have to follow or certain good coding practices which you have to follow while naming a variable in your php code so variable name must always begin with underscore or a letter so it cannot begin with a number or a special character for that matter next variable names can include numbers but not special characters so suppose you want to name your variable number one two three so you can use this variable but you cannot use number at the read one two three since special characters are not included next a variable in php is declared using this dollar sign followed by the variable name now as you can see this is how we declare a variable dollar my underscore variable you can also put a number in between or at the end while naming a variable just not at the start next name some popular php frameworks so some of the popular php frameworks include symphony codeigniter cake php and laravel moving on how to check if a defined variable is null or not so if a thank function is used to check if the defined variable has any value or not so to use this suppose you have this block of code in front of you so suppose you want to check if this x variable that you've defined is null or not so what you do is you put the is it function inside the if condition and it will return true if it's not null while it will return false if it is a null value since it is not null it returns true and we can display echo as variable x is not null while in the case of variable y it is a null value syn so the if condition will be false and it will not display anything next how are objects in php passed so objects in php are always passed by value not by reference next question how to display output directly to the browser now in cases you want to display your output directly onto the browser while running a piece of code you can use it use these special tags to display an output directly to the browser now as you may notice these tags does not contain the php written you can use them directly and replace php with an equal to sign followed by what you want to display and end it with a question mark and a closing bracket moving on what is defined function used for in php now define is used to declare a constant in php also in contrast to the variables there's no need for a dollar sign before declaring a constant since the value of a constant does not change this is how you can use the defined function to declare a constant suppose you want to declare the value of pi as 3.14 throughout your php code and which cannot be changed so we can use define for that next question is related to this question since what is constant functioning used for in php then so constant function returns the value of a constant it is not used to define a constant but it returns the value of a constant so suppose you define a function constant using this defined function and you want to return this value you can use this constant function for that next is multiple inheritance supported in php so php only supports single level inheritance which means a class can be extended from only one class using the keyword extended next what are the different types of loops in php so php consists of a while loop a do while loop a for loop and finally a for each loop so php consists of total for loops next question how to concatenate two strings in php now two strings can be easily concatenated using the dot operator in php now to do that i'll show you with the help of a code suppose you want to concatenate or join these two strings str1 hello guys and the second string would be and welcome to simply learn and want to display these strings together so to do that you need to use this dot operator in echo as you can see this dot operator so first you write this name of the first string then followed by the dot operator i've given this space and then the next order operator because this is also going to considered as a string and then the third string variable and this is how you concatenate two strings next question what is the use of function num ar argument now this function as you can see is used to return the number of arguments passed in a function so suppose you pass a certain number of arguments in a function and want to know how many values or arguments for past you can use this function for that so suppose in this sample code you want to know how many arguments were passed in this sample function so to do that we declare a variable number of arguments and we will equal it to the function of number function number argument now we will display it and this sample has passed three arguments so the output would be three moving on what are super global variables in php now some predefined variables in php are known as super global variables because they are always accessible from any function file or class regardless of the score so in all in all they are globally accessible so suppose you write a piece of code and you declare a variable inside it it would be a local variable and could be accessed only in that part of the code but in case of super global variable they are accessible throughout the entire code they include global server request post get files enb cookie and session moving on how to invoke single line and multi-line comments now a single line comment in php can be made using this hash followed by the comment or double slash followed by the comment while in case of multi-line comments you can use this hash star and write your comments in multiple lines and enclose it with a star and slash what i'm going to do now is i am going to show you the use of these comments in actual vs code now let us take this block of code for example now suppose you want to add a com single line comment after this variable so what you will do is you can use this double slash this is a variable also you can use slash this is also a variable so this is a single line comment now if you try to write something else after this in the next line it will take it as part of the code not part of the comment so what do you do when you need to write multiple lines of comment so suppose you need to write two three lines about this line of code what you'll do is you'll use a slash star now write the comment this is displaying simply learn so this is a three line comment which you can end simply by star and a slash this is how you write single line and multi-line comments now let's move on to the next question that is name some common applications of php so some of the most commonly used php applications are system functions firm handling so php is very commonly used to handle the forms that you see on the web pages cred tasks now crud tasks are create read update and delete so when you will be working with databases this is a very important part of using databases that is crud and php is used very commonly in that next accessing cookies variables and set keys and finally data encryption php provides security through some of its frameworks which can be used and is used very commonly throughout a lot of websites so now that we have gone through the beginner level questions that are frequently asked in php interviews let us now move on to the advanced level questions so the first question would be how can you execute a php script from the command line now a php script from a command line can be executed by opening the command line and inside the command line you have to specify the name of the script or name of the php file that you want to run suppose you want to run a php underscore script.php so you type in the name of the php script that you want to run and that particular php script will be executed next differentiate between a dollar variable and double dollar variable so what is the difference between the two now in case of a single dollar variable is it is a simple variable that is simply used to store data so as we discussed earlier it is a variable that we defined to store different data types such as integer float strings etc while a double dollar variable is a reference variable of variable so this is used to reference already existing variables now to use or to understand how these two work you can see this particular block of code here now in this code what you need to focus on is this is a simple variable hello which contains the string welcome to simplylearn and we have defined another variable as well which contains a string hello now in this echo as you can notice what we are doing is we are using this also before that you need to notice is this is the same string as the name of this variable so first we are displaying this variable and then we are referencing this variable here so what it is doing is it is referencing the value to another variable so hello variable is being referenced so when you execute this block of php script what you get the output is hello since this is the variable hello and after that what you'll get is welcome to simply learn since this variable is a reference to this variable next differentiate between get and post method now get method is used to submit form data while post method is also used for the same feature so the difference between them is get method sends data as part of php page url sorry web page url while a post method sends data through http header in get the data since the data has been sent through the url it is displayed in the url of the webpage so it is not secure while in case of post method it is a secure form of data transfer hence when developing a website for some security purposes usually we prefer post method next up how to connect to a database using a php script now suppose if you are asked this question in an interview what you need to do is you need to just write this block of code and explain it to the interview now suppose we have a php script and we want to connect it to a database what we need to do is we will create three different variables that is server name username and password now what we are going to do is we will create another variable con that will be used to connect it and then we'll use the mysqli functions which will then pass these variables to create a connection so these variable values are localhost username password these are the default values now to check if the connection is connected what we're going to do is we will use an if condition if the con variable gets and connect error we will display a error message that is connection field if not we will display connected successfully now as you can see here these names can be the name of the server that you're trying to connect i have used localhost username password for the default values you can use the name of the database that you're trying to connect your php script to next up what does final class and final method mean in php now a final class in php means that the class cannot be extended while a final method means that it cannot be overridden now as you can see in this block of code we have used the final keyword for a class and the final keyword for a function now suppose this final class is being inherited by this child class what the program will return is an error because once you use this final keyword this class can not be inherited and similarly suppose this function is trying to be overridden by this part of the code it cannot be because we have used the final function next question differentiate between function overloading and overriding now function overloading the same function is used for different purposes based on the number of arguments inside the function while in case of function overriding the same name and same argument function is used in parent and child class respectively to change the behavior of parent class method now let me show you and demonstrate the difference with an example so let us look at this code so suppose you have a function named show title which does have contain a single parameter and displays when called upon using this parameter displays function1 now if you want to use the same name of the function for a different purpose what you can do is you can increase or change the number of parameters inside the function that is it now contains two parameters so when the same function is called using two parameters it will function differently and display function overloading so this is how function overloading works next from this piece of code we can understand function overriding suppose you display a function demo in a base class and you want to override this demo function inside the derived class so what you do is you make another function with the same name inside the derived class with some different properties as you can see it displays something different now you create an object for the base class and when you use this base class object to call this demo function you can use the properties of this function here while if you create another object that is object 2 for the derived class and you use this object to call upon the same demo function you are overriding this base class demo function that was inherited instead what it will use is it will use the properties of the derived demo function so that is how you overload or override a class function in php now let's move on to the next question that is differentiate between equal to equal to and triple equal operator so a double equal operator is generally used to check if the value of two operands are equal or not it is generally used in case of conditional statements while a triple equals to operator performs a type save comparison which means that will that it will only return true if both operands have the same type and the same value so you can understand this more with this piece of code so suppose in this case since they both are equal it will return true while in this case they both have the same type hence it will return true now let us next check this equals to equal so since they both are one and in php it will display as true since they are equal while when you are type checking that is you are checking if they are equal with the same type and same value it will display a false since one is an integer and the other one is a string value also if you check two different strings with the type save it will also display true next question how does exception handling work in php so when an exception is thrown code following the statement will not be executed and php will attempt to find the first matching catch block so if an exception is not caught a php fatal error will be issued with an uncaught exception and exception can be thrown and caught within php so what we do is we use this try and catch method to try the code and if an error occurs we can catch if an exception occurs we can throw it and the catch function will catch the exception and if there's we do not include the catch function it will result in a fatal error next up differentiate between require and include now require if a required file is not found it will throw a fatal error and stop the code execution while in case of include if an essential file is not found it will produce a warning and still execute the remaining scripts so as you can see both of these include and require i use in the exact same way with different functions next up explain different types of errors in php now php consists of mainly three errors notice warning and a fatal error now notice is a non-critical error which means that something minor went wrong during execution and a lot of times you just don't pay attention to it a warning is a critical error now it is given in condition where suppose an include function that we just discussed in the previous question then to retrieve a non-existent file so suppose you use an include function and the file does not exist it will display a warning and final is a fatal error so it is a critical error resulting in termination of the code so as we discuss in the try and catch part of the question if an exception is thrown and we do not have a catch function for it it will display a fatal error which will return in termination of the code next question how to call a function by a reference so ampersand sign is used to call a function by reference now in case of reference the actual value is modified if the value pass inside the function is also modified while in case of value the value of the original value does not change so this piece of code here is an example of how you can call a function by reference here as you can see this ampersand sign will call this function by reference and any changes made in the variables here will affect the original ones next question create a singleton class in php so how do we create a singleton class in ph before that let's have a look at what is a singleton class now a singleton class in php is a class that can have only one object and hence provides only a single point of access so in generally generally in class you can create as many objects as you want and it will in turn create different access points into that block of code so in a singleton class you can only create a single object hence singleton so this piece of code as you can notice is used to create a singleton class now in to create a singleton class you need to have the constructor function private now here as you can see a singleton class is created using this private construct and it then checks if there's only one instance created and if it is it functions properly and displays initialize only once next question how to encrypt a password using php so php can be used for encryption techniques now the password underscore hash function creates a hash password from the password string using hashing algorithm so suppose you create a password string and enter your password as password at the right one two three and you put it inside the password has hash function so what it will generate is we are echoing this generated hash so what it will generate is this so this is the this is random it changes every time you generate the password since it is encrypted and same when you pass this password to the database using hashing algorithm even in the database the password will not be visible so your data is secure next question mention different sorting functions for errors in php now let us understand this question in the vs code so php consists of different sorting functions which you can use to sort and given array automatically so if you want to sort an array in ascending order what you need to do is use this sort function so it will sort this array in ascending order now if you want to sort it in descending order use our sort that is reverse sort similarly suppose you want to sort an array in terms of value in ascending order so you need to use a sort function that is this so in terms of value what in terms of value means is suppose in a given error there are keys and values so it will sort the array based on the values that is this 22 27 and 37 so the array will be the same since the values are already sorted now if you want to sort the array in according to key that is this you can use k sort that is key sort function that is provided in php so in case of key sort what it does is it will sort the array in key that is the first one would be d that is duke second m mac and the third r that is raw now if you want to sort this array in descending order in terms of value you use instead of a sort you use a reverse sort similarly if you want to sort an array in terms of key in descending you use k instead of k sort k r sort that is k reverse sort so these are the different sorting functions that are inbuilt into php moving on what will be the output of the following code now if this code is given let me give you some time and try to pause this video and think of what will be the output of the following code so the output of this code will be 21 comma 21 or 2 1 comma 2 1 how did it happen but before that if you got it correct congratulations but if you want to understand it see a is a variable that contains the value 1 while a b is a variable that is getting the value of a variable through reference now we make changes in the b variable with 2 followed by this variable again which is calling the value of a by reference so if we make changes here we also make changes in the value of a now if we display this since the value of a is already changed by reference it will display 2 1 that is the value here and again since the value of b is already 2 1 it will again display 2 1. moving on what are construct function and destruct function in php so a constructor or construct function is automatically invoked when a new object of a class is created and then can be used to initialize value in class so when you create a object an object for a class a constructor function is automatically invoked but this can also be so it does not contain any value when it is invoked but you can also use this construct function to initialize some properties to give some properties to the class which will act as its default properties if nothing or no new properties are given to the class next is a destruct now a distract is automatically invoked when an object of a class is destructed suppose you end the part of the code of a class you want you are destroying the object when you're ending the piece of code a destruct function is automatically invoked to clean up the resources next is how can php and javascript interact now php and javascript can not directly interact with each other since php is a server-side scripting language while javascript is a client-side language but there is a way that these two wonderful languages can interact with each other so we can swap variables since php can produce javascript code to be implemented by the browser so yes you can produce javascript code from php which can then be implemented by a browser and then it is probable to pass those precise variables back to php via a url next question is explain type hinting in php now in php type hinting is used to specify the expected data type that is array object interface etc for an argument in a function declaration now during a function call suppose if arguments does not match the expected data type the run time will display an error and the probe that is a fatal error and the program will then terminate now in this code here what we are doing is we are type hinting so this is this code is for string type hinting and this code is for integer type hinting now if these particular set of functions that have already specified the type they are expecting does not receive the same type of variable inside them the program will return in a fatal error and it will terminate so moving on to our final question of this video write a class so yes this is a an assignment a kind of assignment for you guys so what you need to do is you need to write a class to solve the following question which i'm going to say so implement a class named basketball we all like basketball right so implement a class name basketball with an attribute named baskets so you have to create an attribute named baskets and initialize it to 0 as the starting position and then create a method named score now when the score method is invoked the baskets must increase by one so let's see the solution now so this is how you create a class that is basketball now inside this class what we are going to do is we are going to initialize the number of baskets that is this variable as 0 as the starting position so to do that what we're going to do is we will be using construct function as we discussed to initialize some default properties for the class so this construct function is used to initialize this basket's variable to 0. now suppose we do not call this function score which is increasing the number of baskets the default value will be displayed as 0 every time now suppose we invoke this core function every time a basket is code this will increase the number of baskets by one so this is pretty simple and this is how you create a simple class which will perform the following question so that's it guys for the full course tutorial on php programming i do hope you have liked it if you did do hit the like button and subscribe to simply learn for more such content thank you for watching stay tuned and keep learning hi there if you like this video subscribe to the simply learn youtube channel and click here to watch similar videos to nerd up and get certified click here
Info
Channel: Simplilearn
Views: 10,317
Rating: undefined out of 5
Keywords: php full course, php tutorial for beginners full, php tutorial, php project, php interview questions and answers, php for beginners, php developer, php for beginners 2021, php tutorial for beginners, learn php, learn php for beginners, learn php in one video, php complete course, php complete tutorial, php in one video, php installation on windows 10, php in vscode, php introduction, php interview questions and answers for freshers, simplilearn php, simplilearn
Id: A5Aiy50mlbI
Channel Id: undefined
Length: 382min 41sec (22961 seconds)
Published: Sat Nov 06 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.