The Blog of Hull based

Web Developer David Carr.

I blog about Web Development and Web Design.

PHP reverse date using strtotime

I use datepickers a lot in my projects the date’s default to the American YYYY-MM-DD format so they store in the database, the trouble is my clients are UK based so it’s not very readable. The datepickers let you set the format you want so I use DD-MM-YYYY.

That’s great until it needs to go into a MySQL database then I need the former date. As I know what the format will always be using strtotime makes it easy to convert like this:

Read more

PHP 5.5 is now end of live, upgrade to 5.6 or higher.

As of the 10th July 2016 php 5.5 is officially end of life, as a result it should not be used anymore. Any applications still using 5.5 should be upgraded to php 7 ideally or failing that 5.6 as a minimum. 

5.5 was released in 2013, active support ended 10th July 2015, today security support has ended. Any vulnerabilities that may exist in 5.5 will NOT be patches any more and could leave your site vulnerable to attack.

If you host does not have 5.6 or higher I highly recommend you contact them and ask to be upgraded or find a better host.

Upgrading to 5.6 should be painless nearly everything works without changes, having said there there are some backward incompatible see migrating from 5.5 to 5.6

Read more

Hide form elements easily with conditionize.js

When working with forms it’s common to hide or show form elements based on a condition, this involved writing javascript to check for a change on the chosen element once detected then activate a show or hide code snippet. Whilst that works well it can be time consuming and tedious when doing multiple conditions. This is where a conditionize.js comes in.

Read more

Mac: Wrap any website to a desktop app using Fluid

I’ve been thinking recently that it would be really nice be able to have a website wrapped as a desktop appliation much like how the Whatsapp wrapper work. Fluid a Mac tool does this!

download it from http://fluidapp.com/

Enter a website address give it a name and select an icon or select to use the websites icon. Then the website application will be created as a desktop app, this internally uses Chrome.

Read more

Autoscroll page with jQuery

There are times when it’s really useful for a webpage to scroll up and down automatically. For instance when showing information on a TV screen you may not want to scroll manually. Using jQuery its possible to have the page automatically scroll down at a set speed then scroll back to the top and repeat.

Read more

Github announces unlimited private repositories

Today Github has announced private repo’s are now unlimited for upgraded accounts, for organisations the starter package was 10 private repos for $25 a month, this has been upgraded to $9 a month after the first 5 users still at $25 a month but with unlimited repo’s.

Personal accounts also have unlimited repo’s but $7 a month, whilst there are services like bitbucket that offer free private repo’s I’ve never taken to them in the same way I do with Github. Personally I prefer the Github so this is really good news!

Read more