General Question

appleyard's avatar

I want to learn PHP, but I am pretty much computer illiterate. What steps do I take?

Asked by appleyard (45points) November 17th, 2008

I used to know some very basic HTML from a class in high school (6 years ago). I’d like to practice that more and then move on to something like PHP (if there is a more plausible next step, ideas are welcome).

But I completely forget where to start! Do I just learn some code and type it into notepad? Then what do I do? How do I view the product of my coding after I’ve typed it? Do I have to register a domain? How do I get the code from notepad to the website? Do I even need a website to view it? I read something about setting up a “web server” but I don’t even know what that is! So what do I need to download, buy, or install? What websites provide the best tutorials?

As you can see, I’m seriously way behind on this stuff and would appreciate if anyone could help me get started. I really could use a step-by-step guide to slowly explain all of this to me as if I were an idiot. Thanks a lot.

Observing members: 0 Composing members: 0

6 Answers

dynamicduo's avatar

For HTML, you don’t require any additional software. You can save it on your local computer just like any other file, and the website will be visible to you only. You don’t need any special software to do the HTML coding, but I would recommend the free Notepad++ because it structures the file and adds in color to the tags. You would open the website through your browser, by going to File, then Open File, then browsing to the website location on your hard drive. This is the easiest way to get back into learning HTML since it requires no money.

For learning the HTML itself, I recommend the W3 Schools website. It looks a bit old, but their knowledge is rock solid: W3 HTML Tutorials

The one downside to having your website on your hard drive is no one on the Internet can see it*. This may be a good thing or a bad thing, depending on what your goals are. While you are learning, there is no real point to paying for a web server, because in all honesty no one will find your website unless you give out the address. If you do want it on the Internet, you need to get some web hosting, and a domain name. The easiest way is to purchase from a web hosting company of which there are many. I personally use A2 Hosting, they offer a $5 a month 10GB plan (which is WAY more than you would need for learning, in fact it’s way more than a reasonable website cound use!) and they sell domain names for $13/year. Note, please be careful when purchasing your hosting, some places sell domain names and web hosting for a higher price to rip people off. A dot com domain name is no more than $15, and you can easily find web hosting for under $10 a month or lower.

Another thing to note about web hosting is your requirements. You want to learn and use PHP, so your hosting company will need to provide PHP and a database (most likely MySQL) support. The hosting company I linked to above provides this environment. Many other hosts do as well. Shop around to find a company that suits your needs.

PHP is a bit of a different beast. It’s a server-side language, which means you can’t run PHP code on your computer without installing some software. Luckily if you’re running Windows or Linux (probably Mac too, but I have no experience with that), it’s very easy to set up what’s called a WAMP setup: Windows, Apache, MySQL and PHP. Apache is the server, MySQL for databases, PHP for well PHP. Again, W3 has more information and links about how to set this up: W3 PHP Info Now this does require some tech knowledge to set up, but the plus side is it’s free. Again, same as with the HTML on your local computer, no one but you will be able to access the website*. But it’s a great way to learn and practice. You can always purchase hosting and use it as your testground too if you don’t feel up to installing it on your local computer.

As for learning PHP, there are hundreds of books and sites to learn from. The best reference library is PHP.net – simply type a function name and its description, examples, and community feedback is displayed. It’s by far the best reference library I’ve ever seen in any language. There are also hundreds of tutorials and pre-build modules you can download, install, and learn from. PHP is not a compiled language, so like with HTML you can learn from the source code (however unlike HTML, PHP source code is not displayed when you go “View Source”. You need to have the actual php file in your hand to view the code.)

To make the files “live” on the internet, you upload them. There are many tools to do this. I use FTP (file transfer protocol), and I use a free Firefox plugin called FireFTP.

And a final tip: there are some companies that offer “free” web hosting. I do not recommend going this method. First off, they often limit it to HTML (so no PHP, no databases, none of the fun stuff), and they sometimes put an advertisement in your page. As well, it’s good to learn how to manage your files properly in case you want to make another website! Knowledge is power :D

Phew, big answer. To sum it up, you can practice HTML on your own computer easily. PHP needs a bit of software installed, but can be done for free. But no one but you will be able to see your website unless it’s on the Internet. If you want your site to be on the Internet, you need a Domain Name and Web Hosting, which many companies offer.

Take it slow, start off by not spending any money and learn on your local computer. And have fun!

*: Technically there are ways to create an Internet address that would let your computer become the web server, but many ISPs don’t like you doing this and may forbid this in your terms of service.

cwilbur's avatar

It depends on what your long-term goal is.

There are several things you need to learn to be a successful programmer. One is the art of programming—the mental skills you need to solve the problem, and familiarity with data structures and algorithms. Another is the syntax and semantics for at least one programming language. And you need to learn people and project management skills to get it all done.

The two most difficult parts of this are the art of programming and the art of people management. And in the art of programming there’s a sizable component of theoretical knowledge that makes the job easier. Many people who don’t know any better confuse knowing a programming language with knowing how to program; they are not the same thing at all, as a reasonably competent programmer will usually know the basics of anywhere from 3 to 30 programming languages, and will not have much trouble picking up another one.

So if you want to do this seriously, the best thing to do is to go to school for it. You’ll have the structure you need to learn and a lot of help with the theoretical parts of it. It’s a lot easier to pick up the practical parts if you know the theoretical parts—you can do it on the job—than it is to pick up the theoretical parts if you know only the practical parts.

jrpowell's avatar

I would start off with installing XAMPP.

That way you can play around on your computer instead of uploading a new file to a remote server every time you make a change.

wenbert's avatar

If you want to learn PHP, then you should also learn MySQL and Apache.

Buy this book: http://www.wrox.com/WileyCDA/WroxTitle/productCd-0764557440.html
After reading it and grasping the ideas in web development, you can follow-up with online tutorials and other advanced books.

I strongly recommend that you read this book first. It gives a bottom-to-top of what you will be doing.

blastfamy's avatar

I second W3schools. It will give you a walk up to the entire theory. And its easy to understand.

Response moderated

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther