Okay: so you want to know what php is all about, and what you need for it
First off, what is PHP:
Php is a dynamic language that can "think" and give the user output. The output that PHP gives is always in HTML (and anything that a HTML page can contain). So everytime you make something in PHP, keep in mind that the result is HTML. This HTML-page is then shown to the user. If you check the source for this page your viewing now (menu: view - Source) you will see that there are no php-tags inside, but just plain HTML... You see: the server reads the PHP, writes the output to a HTML-file and shows this to the user.
The big advantage of php is that the surfer doesn't need to install ANYTHING (except an internet browser ofcourse)... Because the server translates everything for the surfer and gives them HTML only. another advantage is the security, all the things you don't want the user to see is done in PHP, and the user will never know
okay, so what do you need to get create a php page and get it running succesfully?
Not much actually: just a server that understands PHP, and notepad
Huh??... Everyone is yelling to install programs and stuff?!?!
That's really it..! You can use notepad to write the code, and save them with a *.php extension, then upload them to the server that understands PHP, and the server does the rest.
I know, when you say PHP most peeps will start yelling: "APACHE PHP MYSQL" immediatly.. But you actually don't need to install ANYTHING ON YOUR OWN COMPUTER... Again: same with HTML: you don't need to install anything to create HTML, just notepad
Okay, before everyone starts flaming me, there is one but:
..but do you really want to upload your files to a server that understands PHP everytime you want to test something? As you can imagine , that's quite time-consuming. Write your code, upload it.. test it... , doesn't work, check the code... Found the problem, fixed it, uploaded it again, still doesn't work, edit AGAIN , upload again ...etc. etc. etc.
How can you speed up this process... Quite simple: you transform your own computer to a server
And NOW I start yelling : "APACHE!!!"... Because that is a program that can change your own PC in a certified turtlefied server Note: there are a billion and one programs out there that can transform your computer to a server, but apache just happens to be free and is very good, so that's why I named it here.
Okay, you installed apache, everything runs like a charm w00t w00t.. But don't go coding right away, coz as I told you: You need a server that understands PHP... You got the server-part, but now the "understanding PHP" - part
To get your local server to understand PHP you'll need to install (you won't believe this) PHP!!! Okay, so after installing PHP you've got enough to write PHP and test the code on your own computer
.."hey, but wait...What about mySQL then????"...
You don't need mySQL to write PHP, but.... when you start writing pages with PHP you'll soon find out that in most cases you want to use data that you want to store and recall when you need it.. Though this is partially possible with text-files, you'll soon discover that you want to use a database... A free database and also very good in combination with PHP is mySQL... So that's why you want to install mySQL as well
Just to be clear: this explenation is very rough, I kept it very basic because this piece of explenation is purely ment to explain WHAT and WHY you need programs, and what PHP is
Installing APACHE, PHP or mySQL can be a drag sometimes, but luckely there are billions of help-files, tutorials and boards (like this one) that can help you with the installation
If anyone can give a better explenation or has comments plz tell me, I want to use this in a tut I'm creating 🙂