Webshop Blog
PHP Filters and How to Use Them
PHP really shows its true colors when it comes to how easy it is to learn–especially for new programmers. However, as result of this new coders often overlook a lot of really useful functionality that PHP has to offer, particularly when it comes to securing our scripts. Today we’re going to take a look at PHP filters and how easy it is to use them to increase our script’s security.
PHP Header(), Beyond Redirect
If you are a web developer and you’ve ever worked with PHP you have probably come across the PHP header() function in the past. You most likely used it to implement a hard redirect; but you may not have understood exactly what was happening behind the scenes every time you call this handy function. Let’s take a look at what the header() function does and find some uses for it other than its most common use–redirects.
Understanding Variable Scope
I’m going to deviate from the PHP From the Top series I’ve been writing from time to time to address a few other programming/scripting concepts. Today we’ll be discussing variable scope, what it is, and how to use it. If you have been following along with the PHP From the Top Series, some of this may be over your head at this point, and that’s okay. If you have questions, feel free to ask them in the comments. We will cover these concepts again later in the series. Much of this article will apply to many different languages; however, I will be using PHP to illustrate these concepts in this article.
What is Variable Scope
Variable scope refers to the context in which a variable is defined or the setting in which it is available for use. Whenever a variable is declared, it is declared in a particular scope. In PHP, there are two different possible scopes, global and local.
Plans for This Blog
With the redesign of this site, I have decided to finally try to play this whole blogging game. There will continue to be announcements on site launches were proud of and excited about, and other musings we encounter. However, I will also start writing about genereal web development topics–generally covering things I come across while working. This means I will be covering topics such as coding in the PHP, CSS, Javascript, SQL languages, general design topics relative to the web, etc. I may even start a “Learning PHP” series of some sort. We’ll see how this all pans out, but I am definitely going to make a solid effort to keep up with regular, fresh content.
Anyways, here’s to blogging and to the future.
