Sending Mail with PHP

Mail is extremely easy to send from PHP, unlike using scripting languages which require special setup (like CGI). There is actually just one command, mail() for sending mail. In this tutorial we will discuss how to use PHP’s mail() function. It is used as follows: mail($to,$subject,$body,$headers); In this example I have used variables as they have […]

PHP/MySQL File Upload – Error Checking

A while back I had written a PHP/MySQL tutorial discussing how to upload an image to your server, and store the information about that uploaded image into your MySQL database. That tutorial covered really only the basics, and I knew that eventually someone would post a comment asking about some more advanced features – such as […]

Want To Play With PHP 5.5? Meet CloudLinux.

PHP 5.5 is still in the Alpha stages of it’s release, and as such the majority of hosting companies out there don’t have it available yet across their networks. CloudLinux however doesn’t believe in that. Not when they have the PHP Selector tool in their arsenal. With the CloudLinux PHP Selector you can set a […]

Basic PHP Template System

PHP has many different template solutions, and the beauty of them all is how simple it makes maintaining and changing your website. Back in the day when everything was handled with static HTML files – if you needed to add a new link to your main menu – you found yourself editing dozens if not […]

The PHP Ternary Operator

PHP has plenty of different operators, the majority of them being either unary or binary operators. A unary operator, such as !, performs its operations on just one single value. A binary operator, such as =, is used to perform an operation on two operads. So following the naming logic you’ve probably already figured out […]

Escaping Characters and Variable Expansion

Escaping characters is basic, but essential to an error-free PHP script. Consider the following sentence for example: Mike’s uncle said, “Isn’t that cool?” Now if we attempt to use PHP to echo this sentence to the browser, those quotes and apostrophes will cause some problems. The quotes and apostrophes inside the string are confused for […]

PHP Variables – Understanding The Basics

If you have ever looked through any programming language – or still remember those algebra classes when you learned what 3+x=5 means then you already know what a variable does. A variable stands for something else, or in PHP it stores something inside of it so that you can recall it later on in your […]