Thanks for that, interesting link - life's complicated ! I've decided not to fix it.
Maybe it will fix itself if I leave it for 6 months?
-------
I was trying to run down the page, performing a sql query and mail() and then outputting an image (a green tick) and some text to indicate that the query ran (becuase sometimes the clients don't require an email to be sent and that info is in the db).
Thinking about it 'now', it's not the best way to do it, the queries need to run at the top of the page - setting, say $client_emailed = 1; then further down the page picking up the value of $client_emailed to output the image (green tick) and some text.
Doah !
If programming were common sense, i'd probably be quite good at it.
