Archive for March, 2008

What is PHP

Friday, March 28th, 2008

I’m writing at this blog to teach other people PHP, but I figured it wouldn’t hurt explaining what PHP is.

PHP is a recursive acronym for Hypertext Preprocessor. The meaning of PHP might not tell you anything though. Have you ever wondered how you can write something in a textbox, press a button, and suddenly everybody can see what you wrote? How pages can constantly change even though you’re visiting the same address? In many cases, PHP is the reason for that.

PHP is a programming language you can use to make dynamic homepages. It can receive input from the user and make actions according to the input. It can store data, either in ordinary files, or in databases, for later use. I could go on about what you can do with PHP, but instead I’m going to say this - your imagination is (almost) the limit. You can even make images or flash animations with PHP.

Want to learn PHP? Keep reading my blog.

Before you start learning - the server

Saturday, March 22nd, 2008

PHP isn’t something you can write and then just run by double clicking the file (well you can, but please don’t think about that right now). I’m going to assume that most of you that read this article use Windows, but if you’re using something else (like myself - using ubuntu linux, which I recommend btw) and want help, feel free to message (write a comment or something) me.

Okay, let us get on with it. There’s three thing you need to write, execute and see PHP. First - an editor. You can write with the usual notepad, but I recommend something else, like Notepad 2. Downloading and installing that is pretty easy, you download Notepad 2, open the .zip-file and put the file Notepad2.exe wherever you want it.

Notpad 2 is for writing PHP, but to actually see the PHP in action you need a webserver and a browser (Opera, firefox, safari, IE etc.). If you wonder what a webserver is, it’s simply the program that sends you webpages you request. When you requested this page, you connected to another computer’s webserver to get the page.

Anyways, enough explaining what a webserver is.  If you’re using Windows, which I assume you do, the most convenient thing to do is to install Wamp. The installation shouldn’t be too hard, and when the installation’s done, it’s time to start programming PHP.

If you have questions, feel free to ask them to me and I’ll answer as soon as possible.