PHP Tutorials
PHP Form Helper — Quick & Easy SELECT Dropdowns
One of the most time-consuming parts of my job is creating web forms. PHP web forms generally aren't difficult but they take a lot of time. Any time I can save when creating web forms is great, so I've created a helper function for...
PHP Randoms – Random Functions To Do Random Numbers, Random Strings, Random Files, & More
Random values are important to a lot of larger websites. Randoms can be used to generate strings for passwords, quotes, and CAPTCHAs. They can also be used for grabbing random numbers for games and other purposes. Here are a few random functions to...
GoDaddy Hosting Tip – Using CURL On GoDaddy Shared Hosting
I want to throw a quick tip out there to anyone that plans to use cURL on GoDaddy hosting servers. I've been developing a shopping cart and ported the site from my development server to the hosting server. I ran into a huge problem...
Block Access to Include Files Using .htaccess
When I build websites for clients and myself, I use numerous include files to make my website easy to maintain. These include files may:be composed of pure HTML; no server-side programming involvedbe PHP class files; used throughout the websitecomposed of both HTML and PHPPHP code...
Suppressing PHP Errors & Warnings Using @
One part of making sure your website is secure in its hosting environment is to handle errors in a good fashion. If you don't have complete control of your hosting environment, you don't know what you can expect in the way of error handling if...
PHP Cookies: How to Set Cookies & Get Cookies
Cookies don't have to be an essential part of a website but can provide some of the "little things" that can set your website apart from the rest. Cookies are small tidbits of information that you save on the client's computer so that you can...
Set Your Site’s Date/Time Settings On Shared Hosting Using PHP5’s date_default_timezone_set()
One annoyance with putting my customer's site on shared hosting is not being able to control the date and time on the hosting server. Sure, I could simply host with a local company but that's not always the most cost-effective option.I use a new function...
PHP’s Magic Constants: __LINE__ , __FILE__, __FUNCTION__, __CLASS__, and __METHOD__
Setting constants in PHP is as easy as using the define function, but PHP creates a few constants in every script for you that help mostly for debugging purposes (well, that's generally the only time I use them). These constants are called "magic constants."Magic constants...
Upcoming PHP6 Additions & Changes
Seeing technologies you love move forward is an exciting feeling. Another version brings hope of better integrated tools, increased security, and faster ways to complete core tasks, thus making your web application quicker. PHP6's improvements and and updates are sure to make PHP6 the...
Quick & Easy CSS Compression Using PHP
Loading time of a website is as important as its functionality. You can have a great website but who wants to wait for it to load? CSS compression can help your website load faster and easily maintain its functionality. I've created an easy-to-use...