Make sure your form is set to use the "POST" method. Make sure that the "enctype" is "multipart/form-data". Add a field of type "file". That's it for your HTML. The rest of the work is done on the host side. And that isn't really that hard either, but different browsers make it more challenging.

It is a good idea, for security reasons, to prevent visitors to your site from seeing the files in any given directory. While this will not prevent users from accessing the files, it will keep them from knowing what files are there, which does help to some degree. It's easy to implement such a feature using the .htaccess file.

I use remote desktop (terminal services) quite a bit. I also regularly use other remote access methods such as PCAnywhere or VNC. As such, I'm almost always greeted by the default wallpaper when logging onto a PC. Much of this is courtesy of Dell, but others do it too. Yet I couldn't figure out how to get rid of it.

As I was working on a project, I noticed that the page was no longer rendering in IE (6.0, XP). Strangely, the title had turned into just the URL, as if there was none, and the styles were gone.

On a whim, I moved the title attribute above some meta tags, and it jumped right up on the page, indicating an apparent problem within those meta tags. Sure enough, after looking for just a moment, I found a set of double quotes contained within the tag. Oops.

Apparently IE (6.0, XP) doesn't like this. Interestingly enough, IE on a Mac (5.2, I think I was told) and Firefox, on either Mac or PC, interpreted the string correctly.

While trying to hastily assemble a Javascript image rotation script, it occured to me that you could probably do the same thing with PHP - and it would not only be easier, but more reliable, since PHP happens on the server-side, independent of the browser someone is using. Sure enough, a short search resulted in an easy-to-use image rotation script written in PHP.

I really, really wanted to do a search and replace in MySQL, but I just couldn't find it. Then I did.

  update tablename set field = replace(field,'search','replace');

Just a few minutes ago, a friend asked about displaying a future date on his web site. In this particular example, he wanted the name of the next month. In other words, he'd like the word "October" displayed, since it is currently September. Next month it should change to "November", and so on.

There comes a time every now and then where you need to split up large files. If you have the luxury of those files being split anywhere, you can use something like WinRAR, which will split it up into whatever size you like. If it's good enough for file sharing, it's good enough for you, right?

In the course of working with a project today, I came across some useful information. First, the use of command-line parameters in Perl. All you really have to do is add a space between the program name and the first, and then the first and the second, and so on.

At least in MySQL, all you have to do to return random data from your query is add ORDER BY RAND() to your query, for instance:


This week I've been rather busy working on a number of projects - mostly in languages that I don't typically use (notably Javascript). As such, I found myself digging around for information more than is typical, and came across some gems that helped me out when I was at a standstill.

A number of you have mentioned that you would like to use MT-Moderate, specifically to moderate trackbacks, but are unable to do so because you also use SimpleComments.

Because of the way in which I'm making trackbacks moderated, they will still appear in SimpleComments lists of trackbacks.

Now, thanks to Jayaprakash (JP), those of you using dynamic publishing are now able to get around this limitation.