Back Up Your MySQL Database with PHP

Obviously the ideal way to back up a MySQL database is to use mysqldump. Failing that, a lot of people will use PHPMyAdmin. Unfortunately, however, not everyone has command-line access to a server; and even fewer are able to execute mysqldump from a script. If PHPMyAdmin isn’t already installed, it can be difficult to get it installed and configured on a shared hosting account. Therefore, it’s sometimes necessary to use a PHP script to back up a MySQL database.

David Walsh has done a nice job of putting together a PHP script to backup your MySQL databases. Below is a copy of the code he provides in his blog article:

Read More
A Simple Picasa Tip

With the end of the year drawing near, I’ve been spending a lot of time reviewing and organizing my photos from the past 12 months. Every year, I put together a DVD slideshow of photographs to hand out to family and friends.

This year, I decided to use Picasa to help me identify the photos that I wanted to include in the DVD. However, once I found the photos I wanted within Picasa, I didn’t really know how to get them organized in a way that I could import them into Nero Vision.

First, I tried dragging them into a new Windows folder. I thought that worked, until I realized that the photos actually got moved from their original folders into the new folder. That was not at all what I wanted to do. I wanted to create copies; I didn’t want to move them.

After a bit of searching online, I found a helpful little tip. Once you select the photos you want in Picasa, you can go to the “File” menu and click “Export Picture to Folder“. From there, you can locate the folder to which you want to export the photo(s). I have no idea why this option isn’t available in the context menu when you select photos, but, to me, it would make a lot of sense to add that option there. Until then, I’ll keep on using the File menu to copy my photos.

Read More
Chrome for a Cause

Chrome for a CauseFor those of you that haven’t heard, or maybe weren’t sure if this was real; Google has partnered with some major charities to offer “Chrome for a Cause.” The concept is, when you browse the Web using Chrome, you’ll earn a small amount of credit for each and every new tab you open. At the end of each day, you can donate those credits to one of five different causes.

Google explains the breakdown of what resources are donated for each block of tabs you open in their blog post about this interesting and innovative campaign.

All you have to do to participate in this campaign is install the Chrome for a Cause extension in Chrome (well, first you have to have the Chrome Web browser installed on your computer). Then, simply browse the Web as you normally would, and the extension will keep track of how many new tabs you open throughout the day. At the time of this writing (around 10 p.m. EST), I have opened a total of 141 new tabs since I got on my computer this morning at 8. How many tabs do you think you’ll open in a day?

Read More
How Much Data Do You Use?

As I mentioned last month, I took the plunge into Windows Phone 7 on the AT&T network. For me, this is the first smartphone I’ve owned on my personal cellular account. I’ve had two other smartphones in the past; a Samsung Windows Mobile device on Verizon about 8 years ago and an iPhone 3G on the AT&T network for the last two years; but I’ve never had to track my usage or pay for those, as they were provided by my employers at the time. With the iPhone, at least (I’m not sure about the Samsung device), the data plan was unlimited, so there was nothing to track.

However, with my new Windows Phone handset, I selected the lower-tier data plan on AT&T’s network (200 megabytes of data for $15/month).

Read More
CSS: Fluid-Width Dropdown Menus

More than seven years ago, a fantastic article was posted on A List Apart explaining how to create dropdown menus with pure CSS. Up until that point, most (if not all) Web developers and designers were using javascript in some way to make their dropdown and fly-out menus function. The concept, for whatever reason, was referred to as the “Suckerfish menu“.

Shortly after that article was published, someone else came along and published information about the Son of Suckerfish menus. Other concepts based on the Suckerfish menu came along as well. The major issue with all of those articles and examples, though, is that they seem to require fixed-width menus for some reason. If you don’t set your top-level menu items to be a fixed width, by default the dropdown menu items will either wrap onto multiple or will force the top-level item to expand to fit the dropdown menu.

Read More
WordPress Multi-Site: Switching Blogs

WordPressEarlier today, I was working on a new plug-in for one of my WordPress Multi-Site networks. I wanted to pull a list of top-level pages from each site/blog within the network, but I didn’t want the overhead of using the switch_to_blog() function. All I really wanted to do was to query the appropriate tables within the database, but, with WordPress Multi-Site’s implementation of table prefixes, there was no reliable way to attempt to ascertain the correct table name.

It took me a while to figure out how to do this, but I finally did figure it out.

Read More
Calculating Future Dates with PHP

I recently received a request to set up a form that displays a recurring schedule of dates and times, allowing visitors to request one of those blocks of time as an appointment. The schedule would be the same every week, with numerous available blocks of time on specific days of each week.

I had two choices; I could either manually figure out each of the dates and then insert them into the database (either by-hand or with a script of some sort), which would require me to update the database to add new future dates rather frequently, or I could figure out a way to let PHP figure out the dates for me. I chose the latter, and I’ll show you how I did it after the jump.

Read More
WordPress 3.0.2 Released – Mandatory Security Update

The folks over at WordPress released a new minor version this evening, and are calling it a “mandatory security update”. From the looks of it, only a handful of “minor” (their word, not mine) security holes were patched in this version, so I’m not quite sure why it’s being tagged as mandatory.

Regardless, if you’re running WordPress anywhere, you should really login to your administrative area, back up your site and then perform the update (if you don’t have a nag message at the top of your dashboard, you can always go to the “Updates” section under the “Dashboard” menu).

Read More
Writing Dependent WordPress Plug-Ins

WordPress is a fantastic system in many ways, but one place that it’s really lacking is the ability to extend existing plug-ins. There is no built-in system of dependency when it comes to WordPress plug-ins, unfortunately.

Therefore, if you’re thinking of adding on to an existing WordPress plug-in, you basically have two options:

  1. You can modify the plug-in itself
    Using this method isn’t all that ideal, because any changes you make will obviously be overwritten whenever the plug-in is updated.
  2. You can write a plug-in that attempts to depend on the other plug-in
    With this method, if something changes in the other plug-in that causes your dependency check to fail, you could end up breaking the WordPress installation (which results in a blank white screen on most installations)

I would love to see WordPress implement some sort of dependency check or prioritizing method for plug-ins similar to the way they’ve implemented the method of using javascript and stylesheets. Sadly, though, there seems to be opposition from the development team because of too many unforeseen variables in the process.

Read More
iPhone Apps I Want on Windows Phone

One of the huge downsides of being an early adopter is the lack of features you generally get in the beginning. For me, the humongous difference between the number of iPhone apps currently available and the number of Windows Phone 7 apps available isn’t that big of a problem, but there are a few apps I really miss. Following is a brief list of those apps. Please feel free to add more in the comments if you have any thoughts on the matter.

Read More

Join our team

Do you enjoy technical writing? Care about cross platform mobile apps, HTML5, Javascript and Ninja's? Write for us! We would like to hear from you, get in touch!

Worth your attention