About us

Breaking

2021/05/16

Introduction to PHP Programming

 


In this tutorial we learn how to code PHP. Now before we  
get into a coding part or really quickly want to talk about what exact the PHP is and what it can use it for inside a website. So right now since you already here to learn about PHP it's really important that you already know HTML and CSS. if you don't know HTML CSS it's gonna be a little bit difficult for you to follow along on some of these lessons. So if you don't know it go ahead and go back on my previous article and learn about it first and then turn to a PHP lessons. 

Here now having said this a lot of people are also going to tell you that you need to know JavaScript before learning PHP. Now while it's true that learning JavaScript makes it easier to understand PHP in the beginning it also goes the other way around. If you learn PHP first and then learn JavaScript it also becomes easier to understand JavaScript. So you don't need to know JavaScript before getting into PHP. The minimum requirement is that you know HTML and CSS. So now that we talked about what you need to know before getting into PHP let's actually talk about what PHP actually is? As you that PHP stands for hypertext preprocessor and essentially what PHP is is what we call a back-end programming language or what you might call a server-side programming language. So what you can do with PHP is you can make your website more dynamic. Right now if you were to only know HTML CSS you could create a website where you can go ahead and click on a couple of links and read about stuff maybe put a video in there or some images but what if you want to make more dynamic and make users able to do something on your website. Let's say I want to for example have a login system where people can go and sign up you know a user account and with that user account when they do log in they can go to a forum which you might also have on your website and post something. 




Now in order to have this you're going to need to have a database and a database is used for posting or storing all these posts and users that might be signing up on your website. So if you don't have a database you can't save any information on your website. Now in order to connect the website to the database you're going to need a server-side language and a lot of them out there and the one we're going to be focusing on is the one called PHP. Now PHP is the same thing WordPress is written in it's also the same thing that Facebook uses and it's an awesome tool when you get started on you know learning server-side languages. So it's not one of the difficult ones now what you can do with PHP like I said is you can make your website more dynamic you can also insert stuff into databases, you can get stuff from databases, you can you know create cookies, you can create sessions which you use when you're to actually lock in on a website, you can do a bunch of awesome stuff and it doesn't always have to be something related to a database you can also do stuff on your website not connected to a database but you need to have at least server access when you do you know do something PHP which we'll talk about the next couple of lessons because we do need to set up the local server on our computer before we can use PHP and it's really easy to do. It's not a you know it's not difficult at all.


I just want to mention that PHP can for some people in the beginning be a little bit difficult to learn and the reason is it might be a little bit difficult and the same thing goes for JavaScript. JavaScript and PHP are very different you know the concept behind them are very different from HTML and CSS that's because you need to think about coding in a little bit different way that you would with HTML CSS. So don't don't get stressed or frustrated if you don't quite get PHP in the beginning because everyone who started learning PHP will in the beginning feel like they're learning a bunch of stuff which doesn't really make sense in the beginning but later on a promise it's going to make a lot of sense and just keep following the lessons and you will understand PHP in no time. So now we talked a bit about PHP what I can actually do in that sort of thing I just really quickly want to mention a the actual process of creating a PHP document. When you have a PHP document go ahead and save the empty file as something dot PHPWe can actually go ahead and write both HTML code, JavaScript code, jQuery, XML. You can do a bunch of different code inside our PHP file which is actually why a lot of times later on when programmers learn PHP you don't really see them creating HTML files anymore. They are always going to be creating PHP files and just writing the HTML inside the PHP files. So you just want to put it out there you shouldn't get frustrated if you don't quite understand the beginning everyone has it like that in the beginning. 



No comments:

Post a Comment