Archive for the 'geek.php' Category

managing timezones with PHP and Javascript

Wednesday, December 6th, 2006

In a current project we need to keep a log of all activities and present that log to the users. And once we start needing to tell users about times we raise the whole spectre of timezones.
After some heated design discussions we narrowed our requirements to needing to provide a choice of two possible […]

PHP basics: sorting a multi-column array

Saturday, April 15th, 2006

PHP support for arrays is fantastic, particularly for those of us with a history using ASP. One of the key advantages of arrays is the ability to compile our information, sort it as we want, and then display it. Sorting a single-column array is straightforward (there is a sort() function). But what about […]

PHP basics: generating a random password

Monday, April 10th, 2006

One of the simplest techniques for ensuring the quality of registrations to a website is to require confirmation via an e-mail address before providing access. Quickest way to do this is to not ask for a password but instead mail a random generated password to the provided address. If they then log in […]

comparison and logical operators for common web development languages

Monday, January 9th, 2006

Comparison and Logical operators are used for testing data values. Sadly the operators to use are not consistent across languages. This article summarises the most common operators for the key web development languages:

Javascript
ASP
PHP
SQL

For SQL we checked both mySQL and MS SQL. All operators listed here should work in both.
Comparison

Operator
Javascript
ASP
PHP
SQL

Less than
<
<
<
<

Less than or […]