Dynadot

PHP Resources?

NameSilo
Watch

TorchDev

Account Closed
Impact
7
I'm currently learning some PHP and MySQL. I have a basic knowledge of the two but, I'm wanting to sharpen my skills and dive into them more.

Anyone know of some good PHP tutorial/resource websites that would be useful to someone learning PHP? I know PHP's website has an excellent documentation, but I'm looking for other resources. Websites that offer tutorials or guides must be up to date. I'm currently using PHP 5 (5.5 to be exact) so I don't want any outdated content.

I'm also open to video lessons/tutorials. I've found some decent stuff on YouTube. Are there any particular channels that cover PHP & MySQL well?

Hope to hear from some of you and thanks in advance!
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Well if you have basic knowledge of how things work and you know syntax of the language then the best possible experience you could ever get is from coding itself.

Try creating smaller scripts at first and then you can start building bit complex stuff.

Also try to make your own libraries of functions/classes for reuse in future.

Thanks.
 
2
•••
Well if you have basic knowledge of how things work and you know syntax of the language then the best possible experience you could ever get is from coding itself.

Try creating smaller scripts at first and then you can start building bit complex stuff.

Also try to make your own libraries of functions/classes for reuse in future.

Thanks.
Well those are the things I want to work on. I mess around with a lot of pre-built scripts. I'm trying to learn the syntax and a little more of the basic stuff that I don't know. I'm also looking for some good tutorials that have to do with writing functions and classes.
 
0
•••
When I started learning PHP (around 2002) I bought a proper paper book from a book shop! It wasn't a Dummies book but it was a very good book aimed at beginners.

Of course, I also found a stack of stuff online but the book was very handy for quick reference.
 
1
•••
Here's a few I like:
  • Lynda.com
  • Codecademy.com
  • Learnable.com
 
1
•••
You're best off of thinking of something simple you want to build and then build it and then google everything you don't know while building it. Checking best practices along the way. I still do this now for new technologies so that I can stay updated.
I did some searches and http://www.php5-tutorial.com/ doesn't look half bad (may be a bit outdated depending on that 2007-2014 copyright). I agree with Charles Sweeney though, how I originally first got started was a beginners PHP book and learnt the fundamentals. Once you know the fundamentals you can pretty much do anything applying them with things you research.
 
0
•••
A few pointers you might appreciate:-

Basic SQL is very easy, but understand queries from a system point of view and avoid bad practices. You must ensure your queries close as quickly as possible (when they stack up you have problems), choose the right database type for your usage, make sure you have indices, get the correct permissions (always best to have a user with read-only privileges if never writing to database) and understand what MySQL does for each command (like does it dump everything to a temporary table etc). Make sure you avoid ORDER BY RAND etc.

Always adhere to good security practices in PHP. Avoid EVAL(). Understand that every possible user input could be a hack attack. Pay specific attention to SQL queries that use user inputted values to avoid SQL Injection - it is pathetic how easy it is if you don't protect yourself. There is no built in protection. Typically used to dump the entire database or drop (delete) the entire database. Place all sensitive files (preferably including database password details) outside public_html. Be careful with file inclusion variables.

Generally, write code that works. Don't waste your time writing the best optimum code... go back afterwards and optimise it. Don't use regex unless you have to. Realise that some functions are faster than others. Learn how to properly manage errors. Undertake exception handling with try blocks etc. Its always a good practice to attempt to hack your own scripts before putting them in a production environment.

Hope this helps.
 
1
•••
A few pointers you might appreciate:-

Basic SQL is very easy, but understand queries from a system point of view and avoid bad practices. You must ensure your queries close as quickly as possible (when they stack up you have problems), choose the right database type for your usage, make sure you have indices, get the correct permissions (always best to have a user with read-only privileges if never writing to database) and understand what MySQL does for each command (like does it dump everything to a temporary table etc). Make sure you avoid ORDER BY RAND etc.

Always adhere to good security practices in PHP. Avoid EVAL(). Understand that every possible user input could be a hack attack. Pay specific attention to SQL queries that use user inputted values to avoid SQL Injection - it is pathetic how easy it is if you don't protect yourself. There is no built in protection. Typically used to dump the entire database or drop (delete) the entire database. Place all sensitive files (preferably including database password details) outside public_html. Be careful with file inclusion variables.

Generally, write code that works. Don't waste your time writing the best optimum code... go back afterwards and optimise it. Don't use regex unless you have to. Realise that some functions are faster than others. Learn how to properly manage errors. Undertake exception handling with try blocks etc. Its always a good practice to attempt to hack your own scripts before putting them in a production environment.

Hope this helps.

Thanks for the advice. I've been learning a lot about PHP and I've also been doing a lot of reading and working with the Laravel PHP Framework and Phalcon PHP framework. I've always found PHP frameworks to be very useful and time saving. As long as a framework can fulfill the needs of the project, I see no reason to code sites completely from scratch.
 
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back