phpLiteAdmin Development History

phpLiteAdmin has come a long way since its inception more than 2 years ago. How did it start? It started with a demand that was not met. I needed a tool written in PHP to manage SQLite databases. I remember my predicament – I was running the PHP library, SQLite3. All the admin tools I could find were built on SQLiteDatabase. Beyond that, most of the scripts I could find were outdated and didn’t work right out of the box. I immediately saw a niche for something like phpLiteAdmin.

Continue reading

Setting PHP Script Timezone to User’s Local Timezone

If you are reading this, you probably already know about the PHP function date_default_timezone_set. It’s great because it allows you to set your script’s timezone to whatever you want. And then of course, we have its counterpart, date_default_timezone_get.

Seeing as your goal is to set the timezone to the user’s timezone, you think: “I have everything I need right here” and get the bright idea to nest the getter within the setter like so:

< ?php
date_default_timezone_set(date_default_timezone_get());
?>

Warning: this doesn’t work. Why? The getter will return your server’s timezone – not the user’s timezone, so you are essentially doing nothing but wasting precious bytes.


So get to the point: What is the best way in PHP to get the user’s local timezone?

Continue reading

File Upload Progress Bar in PHP and Javascript

If you want to create a progress bar for your file uploads in pure PHP and JavaScript, I’ve got some good news. In PHP 5.4, a new feature was introduced that allows accurate reporting on the progress of a file upload. In this tutorial, I will show you how to utilize this feature to create a visual, animated progress bar:

File Upload Progress Bar

Continue reading