PHP

PHP snippets and tips. This can be for PHP 4x and 5x, it will state compatibility.

Remembering Radio Button Values With PHP

This short PHP snippet shows how to remember form values when submitted through the post method. For a demo just copy and paste the code and test in your browser.

List All Domains of your PC

This little snippet allows you to list all the domains that you may have enabled in your Apache set-up. I decided to create this code when I was tidying up files on my PC and thought that this was a good way to check what content and site was still alive. There are a couple of things to note/change in the script, but it should run almost as is.

Adding Accesskeys to Drupal Primary Links

After about 3 weeks of playing with Drupal v6 I have finally figured out how to add accesskeys to $primary_links. In this article I will show you how to do this and also how to add the keys to previous versions of Drupal too. Why this little step seemed so hard to achieve is beyond me - though none-the-less we are there how.

Directory Listing with Pagination

This script is a directory lister that shows whatever files you want using the glob PHP function. It can be configured to show as many or as little files per page are you want. You can also exclude certain directories of your choice. The pagination part perhaps needs a little attention but you should be able to work thing out OK.

Show Apache's Loaded Modules

In this snippet we print out the Apache modules that are running on the server.

Syndicate content