- This topic is empty.
-
AuthorPosts
-
April 10, 2013 at 7:10 am #44003
Historical Forums User
ParticipantAfter my final GCSE exams in 5 weeks I’ll be continuing to learn PHP, really excited to get stuck into it again!
Any tips?April 10, 2013 at 7:21 am #131232CrocoDillon
Participanthttp://www.php.net/manual/en/langref.php, I learned PHP by following their manual, and practicing.
April 10, 2013 at 10:08 am #131251Historical Forums User
ParticipantThanks!
How long did it take you?April 10, 2013 at 10:32 am #131256rpotterjr
ParticipantIt’s something that will vary from person to person in terms of how long it will take you to learn php. A majority of learning php is trial and error, and occasionally maybe a little help along the way. It’s not something you will be able to learn over night. One thing that you want to make sure of is that you pay attention to how you program. Take the time to learn about common mistakes made in php programming that leave your website/ application vulnerable to security problems.
April 10, 2013 at 10:32 am #131257__
ParticipantIf you understand the basics of how the language works – how to use functions, how stuff is output – then the rest of it is just memorizing what commands to use for what results.
Couple things that lots of people get hung up on:
… PHP runs **first**, on *the server*.
HTML/JavaScript run **after**, on the user’s *browser*.
… once you use PHP, *everything* is PHP. Even plain HTML (outside the `` tags) is PHP output.
(because of that, I always strive to put all PHP *first* in my scripts, and all output *last* – there are many problems (with sessions, cookies, nice, clean error handling, etc.) you can avoid that way!)
… `die()` **must die**
(many tutorials use `die()` for giving error messages – *don’t!*)
… **never trust user input**. `$_GET`, `$_POST`, `$_COOKIE` – any info you get from your users must be validated (i.e., to make sure it *is* what you *expect*) before use. Sticking it in MySQL queries, emails, HTML output, or almost *any* use in your script can cause serious problems, even if the user is not being intentionally “evil.”
(speaking of MySQL, many tutorials use the `mysql_*()` functions – **they are now deprecated and should not be used**. Learn to use the [mysql**i** extension](http://php.net/mysqli) or [PDO](http://php.net/PDO) instead!)
Good luck! Ask if you have any questions!
-Adrian
April 10, 2013 at 10:46 am #131260Historical Forums User
ParticipantThanks everyone, It’s something I’ve looked into for a while now and will soon be committing all of my time away from school too, I’m really excited to begin learning some more!
Is it best to learn MySQL after becoming confident with PHP or at some point during learning?
April 10, 2013 at 12:02 pm #131265CrocoDillon
Participant> Thanks! How long did it take you?
I’m still learning :P
You can learn MySQL parallel to PHP, once you start using PDO (or mysqli) you’ll need it.
If you want to be serious with PHP it might be useful to learn the concepts of Object Oriented Programming, and learn a MVC framework (using a good framework will improve your OOP skills if nothing else). But start with basic PHP first.
April 10, 2013 at 5:34 pm #131313__
ParticipantKeep in mind that MySQL is its own language; too many people think of it as a “subset” of PHP, and that leads to problems too
: )
April 11, 2013 at 6:43 am #131380Historical Forums User
ParticipantThanks everyone, I’ll keep you all posted!
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.