If you’re here reading this, you undoubtedly are familiar with the world wide web and all the amazing things it can do. There are sites that let you do all kinds of things, from sharing photos to opinions to videos to everything else, or carrying out functions like online banking or shopping. You know how convenient and amazing the internet can be, and you’ve probably had some good ideas for things to “put on the internet” but don’t even know where to get started. Be confused no more! Here’s what you need to know to get on the path of writing and installing your own interactive websites to do whatever you want.
For our purposes, we’re going to focus on PHP. There are a lot of languages out there that interactive web sites are written in, but if you’re new PHP is the best place to start. It’s the most popular language for programming web pages right now. Its main advantages are that it’s easy and inexpensive to get a server that can run PHP applications, and that with its popularity it has the most resources for getting help, support, and existing code to help you do what you want to do. There are other great languages out there, but they have disadvantages for newcomers. For example, ASP.NET is supported by Microsoft and allows for some very detailed applications, but just to write or even use other people’s code you’ll need to buy Microsoft software and use the Windows operating system, which can cost hundreds of dollars out of pocket and since the servers need to buy licenses as well, you will pay more for web hosting. There are free web scripting languages that are wonderful, such as Django or Ruby on Rails, however it is harder to find a web host that supports them and they don’t enjoy the same popularity and wealth of support available as PHP.
You may think that in order to learn PHP you need to buy a big, fat technical book and read a lot of confusing words before you can get started. You can do that if you want, but when I learned PHP for myself, I did it in a much more fun way and learned quicker, to boot. I found pre-made PHP applications that did most of what I want, but that are missing some features that I want to include. Start with a pre-made package that is close to what you want to do, maybe forums or blog software, and install it yourself on your web hosting. Don’t use an automatic installer, though! Upload the files yourself, and learn how to set up the application to use a database. It will be a bit confusing at first, but once you understand how to do this it gets much easier before it gets harder again. Most packages have detailed and helpful explanations on how to do this, so use them to help you understand.
From there, I learned how to make modifications that do what I wanted. Many PHP applications have mod scripts or plugins to help you make customizations other users have made, and I started learning how PHP worked by installing these and eventually writing simple ones of my own. While not convenient, mod systems that require you to change PHP code line by line will give you a peek into what PHP code is like, and you’ll quickly learn how to fix mistakes you’ve made which will give you hints on what PHP expects and what its programming rules are. Once you start seeing patterns, try to figure out what interesting parts of PHP scripts do by looking up functions on the official PHP web site or documentation for your package. Try to write your own mods and plugins, keeping it very simple at first, patterned after other ones you’ve seen. It’s easier to learn PHP by not having to worry about making an entire web site, and just focusing on specific functions. Eventually, if you pay attention and keep at it, you will feel confident enough to try more complicated plugins and mods and maybe even your own application.
In the meantime, you may want to enlist some help. MySQL databases, for example, are the lifeblood of PHP web applications, but are hard to learn at first. You might want to consider software like PHP Page Generator which makes databases much easier to work with. Even simple so-called “CRUD” database operations, which stand for Create, Read, Update, and Delete, are exhausting and repetitive to program, but are at the heart of any good PHP application. Helper software like that can save you hours of time and effort on “reinventing the wheel”.
Good luck in your endeavors, and whether you end up just dabbling in or become a pro at PHP, you’ll find that being able to set up or even write your own web applications will be a very handy tool!