Think I found the answer - the error reporting was too high.
The error reporting was set to ALL. This produced a warning notice about 'undefined index', meaning PHP was highlighting a potential problem with the code rather than an actual error.
Here's a piece of code to check error levels. Other newbies might find it useful, though am sure it could be improved.
......................
// redefine the user error constants - PHP 4
define("U_ERROR", E_USER_ERROR);
define("U_WARNING", E_USER_WARNING);
define("U_NOTICE", E_USER_NOTICE);
define("ERROR", E_ERROR);
define("WARNING", E_WARNING);
define("NOTICE", E_NOTICE);
// set the error reporting level for this script
error_reporting(E_ERROR | E_WARNING | E_NOTICE | U_ERROR | U_WARNING | U_NOTICE);
// error handler function
function myErrorHandler($errno, $errstr, $errfile, $errline)
{
switch ($errno) {
case U_ERROR:
echo "<b>E_USER_ERROR</b> [$errno] $errstr<br />\n";
echo " Fatal error in line $errline of file $errfile";
echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")<br />\n";
echo "Aborting...<br />\n";
exit(1);
break;
case U_WARNING:
echo "<b>E_USER_WARNING</b> [$errno] <I>$errstr</I><br />\n";
break;
case U_NOTICE:
echo "<b>E_USER_NOTICE</b> [$errno] <I>$errstr</I><br />\n";
break;
case ERROR:
echo "<b>ERROR</b> [$errno] $errstr<br />\n";
echo " Fatal error in line $errline of file $errfile";
echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")<br />\n";
echo "Aborting...<br />\n";
exit(1);
break;
case WARNING:
echo "<b>WARNING</b> [$errno] <I>$errstr</I><br />\n";
break;
case NOTICE:
echo "<b>NOTICE</b> [$errno] <I>$errstr</I><br />\n";
break;
default:
echo "Unkown error type: <B>[$errno]</B> <I>$errstr</I><br />\n";
break;
}
}
// set to the user defined error handler
$old_error_handler = set_error_handler("myErrorHandler");
.........
Thanks for all your help.
plowter