Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
For 2023 (and 2024 ...) - 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))

Well House Consultants
You are on the site of Well House Consultants who provide Open Source Training Courses and business hotel accommodation. You are welcome to browse and use our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Java Resources
Well House Manor Resources
Perl Resources
Python Resources
PHP Resources
Object Orientation and General topics
MySQL Resources
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
Extras Resources
C and C++ Resources
Ruby Resources
Tcl/Tk Resources
Web and Intranet Resources
PHP module H312
Tips and Techniques
Exercises, examples and other material relating to training module H312. This topic is presented on public courses PHP Techniques, Intermediate PHP - weekend course / hobby / club / leisure users, PHP Programming, Learning to program in PHP




Articles and tips on this subjectupdated
4621The power of scripting
Over the last few days, I've been helping to populate the Option 24/7 web site - suggesting an alternative to Beeching Style cuts to save money on bus subsidy - by looking at the network as a whole rather than individual routes. Example - don't run all buses the same route between two major towns - ...
2016-01-13
 
4426FileMaker Day to Unix Time conversion
Posting here out of self defence ... this is always one I forget and it doesn't seem to come up on the searches. Coded in PHP.   # 735540 3/11/2014   $timeoffset = 735540 - mktime(12,0,0,11,3,2014) / 3600 / 24;   $daychanged = ($_REQUEST[whichday] - $timeoffset);   $report ...
2015-02-15
 
4319PHP - some quick fixes if scripts have issues, and how to use our support
PHP is a language which is highly configuable throguh the php.ini file - and indeed there are options added / that go away in that file between releases too. So sometimes you'll get warning messages from our scripts even though they work completely correctly for us. All of this is explained on our ...
2014-11-19
 
4310Problem ... I want to print a series of numbered forms
Just occasionally, we come across problems that sound easy but end up looking like they need specialised software that's going to cost money to buy for a single use, before we evel look at the time to learn into it. One such problem has cropped up today in that I want to print out a series of sequence ...
2014-10-07
 
4074A comment on comments in PHP
It's vital when you write a program that you comment it well. That's so that your colleagues will understand later on what you have done (and why you have done it), and so that YOU can remember too. And it's because commenting is vital that every course we teach, from the very first program after "Hello ...
2013-05-04
(short)
789Hot answers in PHP
We've got a lot - a LOT of demonstrations and source code on our site. Here are a few of the most popular ones all brought together in a single listing. Enjoy ... Searching - how similar are two words? - try about source Does a particular URL exist? - try source Uploading an image to a database ...
2013-01-02
 
2981How to set up short and meaningfull alternative URLs
Wouldn't it be nice is URLs were shorter? Well - there are ways of making them shorter these days and you'll find them on networking sites like Twitter ... http://bit.ly/d7t8ID or http://bbc.in/XTQ8V . But where such URLs gain in brevity, they loose in comprehensibility. But it's very easy to provide ...
2010-10-02
 
2478How did I do THAT?
I had great fun putting together yesterday's blog about My train journey from Melksham, with a whole lot of images in the text rather than real words. For my first tests, the images sat on the line like this: which starts to look really ugly once you 've added more that a couple of pictures - so I ...
2009-10-26
 
2274PHP preg functions - examples and comparision
preg_match('%CheckUpdateTime(.*?)Main content end%s',$stuff,$gotten); preg_match_all('%(<td class="destination">.*?)</tr>%s',$gotten[1],$service); foreach ($service[1] as $train) {   $teapot = preg_split('%</td>%',$train);   foreach ($teapot as $element) {     $el ...
2009-07-10
 
2025Injection Attack if register_globals in on - PHP
You may have heard me talk about "injection attacks" and that having register_globals set to on in PHP makes you liable to be caught by them. Well - that's a little bit dramatic as you can write perfectly safe PHP scripts with the setting on if you're careful. Here's an example of a script which is ...
2009-02-04
 
1983Keeping PHP code in database and running it
The software for these articles lets me enter HTML and keeps it in a database. If I want to add PHP, that gave me a problem as the data (HTML) was simply read from the database and passed to my client's browser without being parsed for <?php to ?> sections. But problem solved in two different ...
2009-01-11
 
1958PHP - Parse error: syntax error, unexpected $end ...
Have you ever had an irritating PHP message that says "parse error" or "syntax" error and little else - and points to $end / the last line of your PHP file which is (a) perfectly ok and (b) probably HTML anyway? Something like this: Dorothy:~ grahamellis$ php floppy   Parse error: syntax error, ...
2008-12-23
 
1010Dates, times, clickable diarys in PHP
It's that quiet week between Christmas and the New Year that's an excellent chance to catch up - a little - on some of the things that are important but have been abandoned in the mad rush of urgent things these last 9 months. Like writing a booking system and like - I hope - spending long overdue ...
2008-12-21
 
1684Two PHP include files to make easy web site indexing and navigation
My 'work' in campaigning for an appropriate train service on our local "TransWilts" line started three years ago now (!) with the Save the Train web site ... and grew to include the First Great Western coffeeshop (forum) covering all services in a wedge to the West of London, once we realised that we're ...
2008-06-23
 
1667Checking server performance for PHP generated pages
I had a couple of reports recently about web pages from our site being a little slow to load, and my independent spy tells me that they're not bad, but not the world's fastest either. And a little thought lead me to conclude that could be because of the various PHP scripting elements included at the ...
2008-06-07
 
1649Easy conversion - image formats, currencies and distances
If you're converting between distances (inches, feet, metres, centimetres, metres, furlongs or perches), between currecies (dollars, euros, pounds, roubles, lira) or between graphic file formats (.jpg, .png, .gif, .xbm, .tiff), chances are you'll have any one of a large number of different inputs to ...
2008-05-21
 
1270PHP Standalone - keyboard to screen
PHP is a web language. Yes. And No. You can use it "standalone" too, and we often do so; to develop a whole lot of functions for web use in PHP, then duplicates in some other language, would be frankly silly after all. And so it is that during the current course, I've been running rather more demos ...
2007-07-19
 
917Syntax checking in PHP
If you want to check the syntax of your PHP page without actually running it, the -l option (that's lower case letter L) to PHP at the command line will do that for you: wellho@lightning:~/public_html$ php -l index.php No syntax errors detected in index.html wellho@lightning:~/public_html$ Remember ...
2006-11-07
(short)
Examples from our training material
callback.php   How a Callback works in PHP
dxy.php   Using .html URLs to search a data file
msf.php   generates HTML to link to files in
myod.php   generates HTML to link to subdirectories
ppq.php   Crossreferencing data markers to web pages
robert   Sample data for crossreference demo
Background information
Some modules are available for download as a sample of our material or under an Open Training Notes License for free download from [here].
Topics covered in this module
Singular v plural.
Reporting zero answers and making suggestions.
Cardinal values and the child called "Drop database".
Upper case and lower case names - making good addresses.
Databases.
Sorting.
Specifying an API that can be expanded.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Ruby, Lua, Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses at our training centre in Melksham, Wiltshire, England. It's surprisingly cost effective to come on our public courses - even if you live in a different country or continent to us.

We have a technical library of over 700 books on the subjects on which we teach. These books are available for reference at our training centre.


You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/resources/H312.html • PAGE BUILT: Sun Oct 11 14:50:09 2020 • BUILD SYSTEM: JelliaJamb