?> // CSIRO Manufacturing Science and Technology, Preston Lab // dodelete page (hymod_bddb / boards) require("defs.php"); pg_head("$bddb_label - Delete Board Results"); if (!isset($_REQUEST['serno'])) die("the board serial number was not specified"); $serno=intval($_REQUEST['serno']); mysql_query("delete from boards where serno=$serno"); if(mysql_errno()) { $errstr = mysql_error(); echo "\t\n"; echo "\t\t

\n"; echo "\t\t\tThe following error was encountered:\n"; echo "\t\t

\n"; echo "\t\t
\n"; printf("\t\t\t%s\n", $errstr); echo "\t\t
\n"; echo "\t
\n"; } else { echo "\t\n"; echo "\t\t

\n"; echo "\t\t\tThe board with serial number $serno was" . " successfully deleted\n"; mysql_query("delete from log where serno=$serno"); if (mysql_errno()) { $errstr = mysql_error(); echo "\t\t\t\n"; echo "\t\t\t\t

\n"; echo "\t\t\t\t\tBut the following error occurred " . "when deleting the log entries:\n"; echo "\t\t\t\t

\n"; echo "\t\t\t\t
\n"; printf("\t\t\t\t\t%s\n", $errstr); echo "\t\t\t\t
\n"; echo "\t\t\t
\n"; } echo "\t\t

\n"; echo "\t
\n"; } ?>

Back to Browse Back to Start