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.
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?
The CSS box-shadow property is very useful for casting shadows behind HTML elements. However, did you know that you can create an inset bevel effect by using two shadows on the same element? In this short tutorial, you will learn how to create this using only CSS: