dodelete.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php // php pages made with phpMyBuilder <http://kyber.dk/phpMyBuilder> ?>
  2. <?php
  3. // (C) Copyright 2001
  4. // Murray Jensen <Murray.Jensen@csiro.au>
  5. // CSIRO Manufacturing Science and Technology, Preston Lab
  6. // dodelete page (hymod_bddb / boards)
  7. require("defs.php");
  8. pg_head("$bddb_label - Delete Board Results");
  9. if (!($serno=intval($serno)))
  10. die("the board serial number was not specified");
  11. mysql_query("delete from boards where serno=$serno");
  12. if(mysql_errno()) {
  13. $errstr = mysql_error();
  14. echo "\t<font size=+4>\n";
  15. echo "\t\t<p>\n";
  16. echo "\t\t\tThe following error was encountered:\n";
  17. echo "\t\t</p>\n";
  18. echo "\t\t<center>\n";
  19. printf("\t\t\t<b>%s</b>\n", $errstr);
  20. echo "\t\t</center>\n";
  21. echo "\t</font>\n";
  22. }
  23. else {
  24. echo "\t<font size=+2>\n";
  25. echo "\t\t<p>\n";
  26. echo "\t\t\tThe board with serial number <b>$serno</b> was"
  27. . " successfully deleted\n";
  28. mysql_query("delete from log where serno=$serno");
  29. if (mysql_errno()) {
  30. $errstr = mysql_error();
  31. echo "\t\t\t<font size=+4>\n";
  32. echo "\t\t\t\t<p>\n";
  33. echo "\t\t\t\t\tBut the following error occurred " .
  34. "when deleting the log entries:\n";
  35. echo "\t\t\t\t</p>\n";
  36. echo "\t\t\t\t<center>\n";
  37. printf("\t\t\t\t\t<b>%s</b>\n", $errstr);
  38. echo "\t\t\t\t</center>\n";
  39. echo "\t\t\t</font>\n";
  40. }
  41. echo "\t\t</p>\n";
  42. echo "\t</font>\n";
  43. }
  44. ?>
  45. <p>
  46. <table width="100%">
  47. <tr>
  48. <td align=center>
  49. <a href="browse.php">Back to Browse</a>
  50. </td>
  51. <td align=center>
  52. <a href="index.php">Back to Start</a>
  53. </td>
  54. </tr>
  55. </table>
  56. <?php
  57. pg_foot();
  58. ?>