Dynamic Linking w/PHP

There’s a brilliant lynda.com course called PHP and MySQL Essential Training, w Kevin Skoglund (novafabrica.com) that I’ve launched back into – redoing to reinforce the content. I watch a couple chapters at a time, stop, and then code and build the course content from memory…a challenging but necessary task because I find it’s the best way to make it stick-y in my brain.

If you’re used to working w a CMS (like WordPress) which sets up all the constants you’ll likely need from the beginning, then it’s easy to forget that constants aren’t prefaced with a $ (like variables) and are typed ALLCAPS. After getting the dynamic file paths coded and working, I realized that by defining my own file path and URL constants I’m really getting into some of the more fundamental aspects of what I love about programming–how it’s working under the hood and coming together in the browser.

A few of the tasks I’m really enjoying learning and making habit are:

♦ setting url params and escaping with htmlspecialchars( ) and urlencode( ).

♦ setting up dynamic linking early in process, then copy and pasting to other pages to speed site build.

♦ becoming more comfortable w making custom functions and adding them to keep the final project light and DRY.

♦ looking up and digging into built-in PHP functions, such as strpos( ) and substr( ) that assist w the dynamic linking.

♦ learning about several of the $_SERVER super global indices that power server and execution environment info.

Overall, I’m enjoying the course and having fun which is really the best part of the entire coding process! Kevin makes the content really understandable with his explanations and end of chapter challenges.

 

 

Leave a Reply