For 2023 - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.
Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!
I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
Hiding a MySQL database behind a web page
"Keep the browser simple - with a single route in (http) to a server." That's the philosophy behind the web and one of the things that's made it a huge success. It means that a straightforward browser can contact a single server, and Joe Public, Joan Whiting and Mahatma Ali can all view content. But that means that the complexity of storing and accessing data has to be dealt with on the web server, and the straightforwardness of the browser interface is counterbalanced by some quite complex server side systems. It makes sense, really - for every 1000 browsers there might be one server, and it's far better to have one complicated system that a thousand.
Yesterday afternoon, I put together a demonstration showing these various server side elements. A browser, contacting a web server. And then, behind the scenes, the web server running a Perl program via the CGI interface, and that Perl program in turn contacting a MySQL database server for the actual data. And another couple of sample programs (at the proof of concept level) to add more data to the tables. It's rather a long demo so that - rather than post it all here - I've put a full description in our solution centre here
and I've put all the source files here
. You can even try out the general display page
, the Add Operation Page
and the Add Patient page
s ... although (for server security) I've commented out the line that would save your additions to the tables on our live server I'm not going to risk people entering patients who's names read like adverts!
The demonstration uses the example of medical patients and the operations that have had in two MySQL tables, joined to produce the final results, but the same principles would apply to estate agents selling houses, and to railway trains making station stops! (written 2008-11-15, updated 2008-11-16)
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articlesS156 - Interfacing Applications to MySQL Databases 
mysql_connect or mysql_pconnect in PHP? - (2004-10-30) 
Using a MySQL database from Perl - (2006-03-13) 
Python to MySQL - (2006-03-31) 
Viewing images held in a MySQL database via PHP - (2006-05-17) 
Using a MySQL database to control mod_rewrite via PHP - (2007-10-06) 
Easy selection of multiple SQL conditions from PHP - (2007-11-30) 
Downloading data for use in Excel (from PHP / MySQL) - (2008-01-25) 
Uploading to a MySQL database through PHP - examples and common questions - (2008-03-02) 
Mysqldump fails as a cron job - a work around - (2009-06-30) 
Checking the database connection manually - (2009-08-28) 
Connecting Python to sqlite and MySQL databases - (2010-04-28) 
Joining a MySQL table from within a Python program - (2010-06-02) 
How to display information from a database within a web page - (2010-11-07) 
Perl - database access - DBD, DBI and DBIx modules - (2010-12-22) 
Needle in a haystack - finding the web server overload - (2011-09-18) 
MySQL, MySQLi, PDO or something else - how best to talk to databases from PHP - (2011-09-24) 
Accessing a MySQL database from Python with mysql.connector - (2015-02-21)P420 - SQL databases from a browser via Perl and CGIP308 - Using SQL Databases from Perl 
MySQL - an FAQ - (2005-12-03) 
Answering ALL the delegate's Perl questions - (2006-12-09) 
Object Relation Mapping (ORM) - (2007-06-09) 
Ruby, Perl, Linux, MySQL - some training notes - (2008-11-23) 
The future of MySQL - (2010-01-03)
Some other Articles
Ruby mixins, modules, require and includeFind the linkRuby Programming Course - Saturday and SundayKeys to friendless churchesHiding a MySQL database behind a web pageRecession? Depression?Spa Road Garage and Convenience Store, MelkshamWiltshire Council says - part 2Wiltshire Council says - part 1Melksham Chamber of Commerce, or the FSB
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page
This is a page archived from The Horse's Mouth at
the diary and writings of Graham Ellis.
Every attempt was made to provide current information at the time the
page was written, but things do move forward in our business - new software
releases, price changes, new techniques. Please check back via
our main site for current courses,
prices, versions, etc - any mention of a price in "The Horse's Mouth"
cannot be taken as an offer to supply at that price.
Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).