Peter Schmidt's Video Database - PHP style

"; echo "Unable to connect to Informix video database
\n"; echo "dbs=$dbs, user login=$g_login
\n"; chk_ifx_err1($connect_id); } return $connect_id; } /*********************************************************************/ function common_footer() /*********************************************************************/ { ?>

$heading_str



"; } /*********************************************************************/ function nocache() /*********************************************************************/ { /*This piece of code was taken from the PHP manual*/ header("Expires: Mon, 01 Jan 2000 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT"); header("Cache-Control: no-cache, must-revalidate"); //HTTP/1.1 header("Pragma: no-cache"); //HTTP/1.0 } /*********************************************************************/ function chk_ifx_err1($result_id) /*********************************************************************/ { /************************************************** The ifx_error function return the following string: x [SQLSTATE = aa bbb SQLCODE=cccc] where x = space : no error E : error N : no more data W : warning ? : undefined *************************************************/ $err_string = ifx_error($result_id); if ($err_string[0] == ' ') return; common_header; printf("
Informix error: %s

\n%s
\n", ifx_error($result_id), ifx_errormsg()); common_footer; die; } ?>