View Full Version : How do I learn php ?
linux1880
11-17-2008, 09:18 AM
Dear friends, I have all the books, editors and everything to learn php, I have been reading this book since 2 years, it looks like i understand but when i go for real coding i can't write nothing. I am now principally familiar with classes and function but when I start writing , I don't know what to do. Is dreamweaver cs4 good or zend studio to kick off with and how should I start to really get into the php professional ? Any advise would be highly appreceated.
Thank you
Schmoopy
11-17-2008, 09:55 AM
You have to sort of set yourself a task / exercise to complete. For example, give yourself a problem, like you want to be able make a contact form, and then using knowledge you've already picked up you should be able to create one, then after you've done that set yourself a new challenge.
vividona
11-17-2008, 01:54 PM
I myself started with registration script then registration + login then add article to what I did. now I have simple news script
thetestingsite
11-17-2008, 02:16 PM
Visit http://www.php-mysql-tutorial.com and follow those tutorials. There are also others online, but I can't recall them off the top of my head at the moment.
Hope this helps.
james438
11-18-2008, 04:27 AM
http://www.w3schools.com/PHP/DEfaULT.asP is also good.
The important thing is to know what you want to create. Start small and slowly build upon the script. Always look to see how you can make it better and more efficient.
Like any good salesman will ask "what do you want to use it for?" What do you want PHP to do? After you have figured that out just start typing. Keep it small at first; maybe a few words long. test it out to see if it works and then keep going.
W3Schools' tutorials are generally of terrible quality and to be avoided. The PHP one is no exception.
james438
11-18-2008, 05:56 PM
In that case I withdraw my w3schools suggestion, however what would you suggest is better?
thetrend
11-19-2008, 04:16 PM
I wanted to create a custom CMS for my roleplaying game =]
I started out with the small stuff: registration, login, then adding news, then user mail, then forums. It's a work in progress, but in the beginning I used tutorials for all those things separately. I had to feel around in the dark and make custom scripts from those tutorials, then make sure my custom ones work =] they're right when they say, look for something you want to do, cos that's what I did and I used google to look for those scripts. now I'm building my own ^_^ good luck on learning php, I hope you're successful =]
rodneykm
11-19-2008, 09:05 PM
http://www.tizag.com/
It ends and begins there with those tutorials.
boogyman
11-19-2008, 10:03 PM
You have to sort of set yourself a task / exercise to complete. For example, give yourself a problem, like you want to be able make a contact form, and then using knowledge you've already picked up you should be able to create one, then after you've done that set yourself a new challenge.
This is the best advice out of all the replies that I have seen thus far.
Generally most books will have a section for "chapter review" much like most school books do. Try performing the exercises contained within those chapter reviews. If you must look frequently at the book to perform the exercises, you haven't learned the language.
Reading how something is done can lead to a false positive, because its natural reaction to see something that does work and say oh yeah, that's cool. That's simple, when in fact you are just assuming its simple because the entire problem has been done for you.
Tizag's tutorials are pretty poor, too. If you follow them or the W3Schools tutorial, be sure to cross-reference them with my list of common coding errors, linked from my signature. Hopefully you shouldn't miss too many if you do that. The official PHP tutorial isn't bad.
JasonDFR
11-21-2008, 02:40 PM
Visual Quickpro Guide
"PHP 6 AND MYSQL 5"
by Larry Ullman
I have been through this book cover to cover. I highly recommend it.
You do not need PHP 6 to use it.
It has practical examples and all the code works as advertised.
After you get through this book, start learning the Object Oriented PHP stuff ASAP.
I am starting to look at other languages and OOP is definitely the way to go.
PHP might not be the best language to learn first.
If I had it to do over again, I would have learned javascript first, then probably Python instead of PHP, but, if you already have a decent understanding of PHP, keep learning.
As far as a project goes. You should try to build a "Contact Form" that will allow visitors to your site to enter their name, email address, and a message, then have all of that information sent to your email address. Be sure to focus on validating the information that the user submits to your form.
Next do a log in system. Then add a MySQL database to store the user names and passwords.
You definitely need to find some practical stuff and make it work. That's how you'll learn.
If it's programming in general you want to learn, then I recommend you this post I made in response to similar questions about Java: http://dynamicdrive.com/forums/showpost.php?p=164524&postcount=1337 (and I do recommend you do this at some point in the future, even if you need PHP right now — you won't be a decent programmer until you do).
JasonDFR
11-21-2008, 06:52 PM
Twey gives very very good advice.
I have read his post and agree 100%.
Because of him I have read the SICP book and am on my way to becoming a great programer.
If any of you guys are serious about programming, follow Twey's advice.
Thanks again Twey.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.