PHP Tip, echoing text

When echoing text or assigning variables, your script will execute faster if you use single quotes (apostrophes) instead of quotation marks around text which does not contain variables. For example, consider the following two statements: echo ‘Hello, world, this is … Continue reading

PHP Tip, PHP & forms

When an HTML form is posted to a PHP script, PHP automatically converts periods in field names to underscores. For example, if you had form fields called “” and “” you would access them in PHP by using $_POST[‘first_name’] and … Continue reading

PHP Tip, using date()

When using the date() function, keep in mind that you should use date(“i”) to obtain the minute. A great deal of code incorrectly uses date(“m”) for this, e.g. $timenow = date(“H:m:s”); //incorrect Passing “m” to the date() function will return … Continue reading