iPhone & iPod Detection Using JavaScript or PHP
I was browsing the ESPN.com source code recently and stumbled upon their method of detecting iPhone / iPod touch users and redirecting them to their iPhone-compatible website.
Resize images with PHP script
This small command line PHP script will help you to resize all JPG images inside current directory. Yes, you will find a lot of solutions with BASH scripts, but I decided to write my own command line PHP script. I didn't want to use GD PHP functions for image processing.
From MySQL to HTML with PHP and XML
In my post From MySQL to XML with PHP, I described how to generate XML from the MySQL database. Instead of printing out XML, generated XML can be buffered and transformed with XSL to the HTML. Maybe it sounds complicated for a simple process of displaying MySQL data on the WEB page. But if you set a WEB architecture this way, you will have a separated presentation layer from the database and business logic.
From MySQL to XML with PHP
PHP XML generator can be written in less then 100 lines. In this example, data from the MySQL database are converted to the XML. PHP function sql2xml has an optional second parameter to describe the XML hierarchy, while first parameter is SQL query. Second parameter has the form of integers separated by commas.
Reading multiple parameters in PHP
Suppose you have to send three values: element Id, row and column compounded in one URL parameter. That is simple, parameters can be concatenated and delimited with special character. But how to send multiple of these complex URL parameters? This post should give an answer.
Drag and Drop table content with JavaScript
Content of HTML table cells can be dragged to another table cell or another table. It isn't difficult to define onMouseMove handler and change top / left element styles to move the object. In case with tables, you will have to determine somehow destination table cell. Attaching onMouseOver handler on table cells will not work, because browser doesn't fire events to the elements beneath the dragged object.

