Monthly Archives: November 2010

Adding line breaks to a push button

Have you ever wanted to force the text on an <input> button onto an other line? So did I today, and this is how: Simples!

Posted in HTML/CSS Tagged with: , ,

Converting stored MySQL dates into UK format

You will no doubt be aware that when you save a date in a MySQL database, it must be in the form of Y-m-d. I had some difficulty wrestling with the date() section of the PHP manual , and experimented for

Posted in PHP, SQL Tagged with: , ,

Batch file to perform SSH commands and transfer files from Windows to Linux

At my place of work, I routinely have to update firmware and database files from our office Windows PCs to ARM linux devices. This used to involve connecting to the mini PC using PuTTY, killing a process, then logging in

Posted in General Tagged with: , , , ,

Curved DIV borders

This is so easy!  I used to use a complex set images for top-right, top-left, bottom-right, bottom-left etc. Granted these 2 lines of CSS will not produce shadow effects or anything fancy, but the results are pleasing nevertheless. -moz-border-radius: 20px;

Posted in HTML/CSS Tagged with: , , ,

PHP pagination of search results

Displaying data from a database in a webpage is something every web developer needs to do very frequently. I remember my early attempts at displaying a certain number of records per page like a Google search to be immensely frustrating

Posted in PHP Tagged with: ,

Change the style of font inside a search textbox

I wanted to emulate certain sites where the search box is populated with “Search…” in grey coloured italic font, but as soon as you click on it and start typing, your query appears in black normal font. The examples I

Posted in HTML/CSS, JavaScript Tagged with: , ,

Saving individual pages from a .pdf, as a new .pdf

Ever needed to save a specific page of a .pdf document as a new, separate .pdf? Apparently you can do it if you purchase a full Adobe software licence, or you could use this free online tool: http://www.splitpdf.net

Posted in General Tagged with:

Automatic MSSQL 2008 Backup Batchfile

I was asked to create a simple process for backups to a MSSQL database. After a little searching around online I came up with a Windows batchfile, and then used scheduled tasks to run it weekly: set ToDaysDate=%date:~3,2%%date:~0,2%%date:~6,4% “C:Program FilesMicrosoft

Posted in SQL Tagged with: , ,

JavaScript News Ticker

A site I have been working on has had a Flash banner with scrolling text for a couple of years. The problem is that the page took longer than it should have to load, and visitors couldn’t see the banner

Posted in JavaScript Tagged with: , ,

PDO/SQLite connection

I have been working for a while on a project involving running a PHP web application on on an ARM linux mini PC. There was an existing application on the PC whose SQLite database I needed to manipulate, to feed

Posted in PHP Tagged with: , , ,