Press "Enter" to skip to content

Posts published in April 2012

Remove dotted outline around anchors

This has become quite a common question asked by many website owners. “How do I remove that dotted outline around an anchor?” Lucky for you all, it’s a really easy one to resolve as well. You just have to take a look at CSS for a second and add one…

Get amount of hours between 2 hours

If you would like to get the amount of hours between 10:00 and 12:00 then use this! [code lang=”php”] function timeDiff($firstTime,$lastTime) { $firstTime=strtotime($firstTime); $lastTime=strtotime($lastTime); $timeDiff=$lastTime-$firstTime; return $timeDiff; } echo (timeDiff(“10:00″,”12:00”)/60)/60; [/code]

How to embed HTML5 video with fallback

A common question with the rise of HTML5 becoming more and more common and the whole iGeneration (iPhones/iPads/iEtc) is “how can I embed a video on my site without using a flash player?“. An option that really does work quite well is to use the JWPlayer and set it up…

How to backup all mysql databases

In order to backup all mysql databases, you can run the following command in your linux command line: The example below is configured with username “theuser” and password “thepass”. [code lang=”bash”] mysqldump -utheuser -pthepass –all-databases > all_dbs.sql [/code]

Invalid command 'RewriteEngine'

If you receive the following error message if means that mod_rewrite is not enabled in Apache: Invalid command ‘RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration. [code lang=”bash”] a2enmod rewrite [/code] Bear in mind this is done like this on Linux Ubuntu, not entirely…

PHP – hours difference (HH:MM format)

It’s very simple to get the difference in hours using PHP [code] function timeDiff($firstTime,$lastTime) { $firstTime=strtotime($firstTime); $lastTime=strtotime($lastTime); $timeDiff=$lastTime-$firstTime; return $timeDiff; } echo (timeDiff(“10:00″,”12:00”)/60)/60; [/code]