PDA

View Full Version : A very poor php student!


tony09uk
08-25-2011, 12:29 PM
Please help. I have been watching a number of basic PHP video tutorials in an effort to learn PHP. But i couldn't understand how the examples they were showing could be used in practical programming. So I started to watch a few basic tutorial videos on building a CMS (so far ive tried three different sites), but I get so far and then something goes wrong and I get error messages, I look though the code and it seems alright to me, i've even gone as far as trying spot the difference between mine and there's :s

Its getting really frustrating now. I think i'm having problems because I don't fully understand why everything they are do. Can someone please advise me on a plan of action, what is the best way to learn PHP? I have gone back to the getting started videos but I still don't see how they can be applied to practical programming.

I know there are a lot of shortcuts and programs to do a lot of the work for you, but id like to learn how to do this not learn how to use another program.

domedia
08-25-2011, 02:36 PM
I would get a good book. I can advice one if you need.

Also, most of the time you have to learn the basics first, before you start building a CMS.

edbr
08-26-2011, 01:47 AM
i think learning anything starts often with examples that seem pointless but is usually needed to learn the basics. i do understand though learning OOP is often examples classes of animals where dogs go woof and cows go moo. very frustrating. :)
php was very confusing at first but there are lightbulb moments ahead when it all becomes clear.
i do think you should back off the cms for now and get to grips with smaller steps.

if you have a look at http://www.tizag.com/phpT/ i find they lay out a good work through list and very simple but clear examples.

tony09uk
08-26-2011, 07:53 PM
thanks guys. I am reading sams teach yourself php and going through the basic video's....granted a little on the quick side i think. My problem is when i try create something very simple it fails miserably. Oh well i will keep watching and re-watching the basics.

tony09uk
08-26-2011, 08:06 PM
i did mean to ask about the examples.
For example, with the varible examples they change the variables value to show that it displays a different result in the browser. But where would this variable be changed in the 'real world' and arnt variables created by the user? Ie their name age gender etc...

edbr
08-27-2011, 02:05 AM
But where would this variable be changed in the 'real world' and arnt variables created by the user? Ie their name age gender etc... in that example yes. not sure what they are refering to but in some circumstances variables could change ( an incremented value for example)

davidj
08-30-2011, 01:16 PM
Learning how to code is the best course of action so you are on the right track. You don't really start learning until you have built a few sites but you are doing it right. Everyone has a different learning technique. Some find books help. Others like videos. Some like one to one tuition {Cough}

Keep going and the penny will drop

tony09uk
08-30-2011, 08:48 PM
Firstly EDBR, thanks for the link, it has been mighty helpful.
Secondly, David I might get back to you on that, if it don't sink in any time soon

tony09uk
09-01-2011, 02:06 PM
quick question: i feel like im getting a stronger understanding of what different commands do but it was mentioned earlier you dont really learn until you start to put it to practical use. What sort of things should i be trying to learn, other than the basic commands. Earlier i said i tried to copy a tutorial for a cms and it was said that's probably a little to advanced. Can anyone please advise as to what would be a good starting point to start creating practical, useable scripts.
Many thanks

edbr
09-02-2011, 02:43 AM
i would suggest a membership section as it can be done in sections increasing as you learn for example :
1. admin section protected with log in and out, you can learn about sessions
2. add a user / member section and database
3. sign up sending a mail, insert into a table but make it admin approved using update (you can echo onto your admin page. //this can use mail forms and validation
4. make a user data table joining tables with the user table so they can add stuff using a form and maybe an upload file

from there you can look at
a I forgot my password link where the use must show the email
address and verify it against the user database and mail a new password
use md5 sha1 or salting to improve security.
i think it will keep you interested as each stage is a functionable item