Some time ago I decided to keep my favourite links in a little MySQL database rather than use browser favourites. By presenting the links as a web page using a php script which also has the ability to maintain them I get portability between browsers and computers.
I used the ham radio section of my database for the DigitalHam links page and mentioned there what I had done – looking there should give a good idea of what this is all about. I have now been asked for the source code so I’ll provide it here as-is. If you use this you will probably need some way to populate the database from an export of your existing favourites as there is no facility for block additions and adding link by link is going to be pretty tedious.
There is no documentation but hopefully usage will be pretty self evident. I have provided a zip of the script and images for download here.
To run this you’ll need a web host that provides PHP and MySQL I have used 000WebHost.com for simple projects in the past and they should be fine as a free hoster for this script.
This is all offered very much as-is. The security is rudimentary and you use it at your own risk. I don’t mind answering the odd question but I’m not going to get involved in any lengthy explanations or redevelopment.
Here is a brief explanation of what needs to be done. It is unlikely to be enough for a total beginner as I’m not a technical writer.
Download the zip file above and extract the files in it.
Get a web hosting account that supports PHP/MySQL
Set up the database table by pasting the following into the MySQL SQL input box and hitting enter
MySQL database setup code
CREATE TABLE IF NOT EXISTS `favourite` ( `fav_id` smallint(4) NOT NULL AUTO_INCREMENT, `category` varchar(50) NOT NULL, `url` varchar(255) NOT NULL, `link` varchar(40) NOT NULL, `target` varchar(20) NOT NULL DEFAULT '_blank', PRIMARY KEY (`fav_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ;
You can either copy/paste direct from this page or the text is included in the zip as file favourites.sql
Edit the index.php file to include your own login and database user password and name. Use an FTP program to upload index.php the images directory and optionally secure.php if you are using it.
Just entering your webhosting domain name into your browser address bar will now bring up the index.php page and you can start entering your favourites one by one from there although it will be more convenient and quicker to prepare a file of them in SQL format and use MySQL to populate the database.
A sample of the syntax needed is given below…
INSERT INTO `favourite` (`fav_id`, `category`, `url`, `link`, `target`) VALUES (1, '# My Sites', 'http://www.digitalham.co.uk/', 'DigitalHam', '_blank'), (2, '# My Sites', 'http://www.foofers.co.uk/', 'Foofers', '_blank'), (3, '# My Sites', 'http://www.kwikbreaks.co.uk/?kbwp=', 'Kwikbreaks Original', '_blank'), .... etc. etc. up to the final line which has ; on the end (4, '# My Sites', 'http://www.kwikbreaks.co.uk/owners/index.php', 'Kwikbreaks Owners', '_blank');