dodelete.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 (!isset($_REQUEST['serno']))
  10. die("the board serial number was not specified");
  11. $serno=intval($_REQUEST['serno']);
  12. mysql_query("delete from boards where serno=$serno");
  13. if(mysql_errno()) {
  14. $errstr = mysql_error();
  15. echo "\t<font size=+4>\n";
  16. echo "\t\t<p>\n";
  17. echo "\t\t\tThe following error was encountered:\n";
  18. echo "\t\t</p>\n";
  19. echo "\t\t<center>\n";
  20. printf("\t\t\t<b>%s</b>\n", $errstr);
  21. echo "\t\t</center>\n";
  22. echo "\t</font>\n";
  23. }
  24. else {
  25. echo "\t<font size=+2>\n";
  26. echo "\t\t<p>\n";
  27. echo "\t\t\tThe board with serial number <b>$serno</b> was"
  28. . " successfully deleted\n";
  29. mysql_query("delete from log where serno=$serno");
  30. if (mysql_errno()) {
  31. $errstr = mysql_error();
  32. echo "\t\t\t<font size=+4>\n";
  33. echo "\t\t\t\t<p>\n";
  34. echo "\t\t\t\t\tBut the following error occurred " .
  35. "when deleting the log entries:\n";
  36. echo "\t\t\t\t</p>\n";
  37. echo "\t\t\t\t<center>\n";
  38. printf("\t\t\t\t\t<b>%s</b>\n", $errstr);
  39. echo "\t\t\t\t</center>\n";
  40. echo "\t\t\t</font>\n";
  41. }
  42. echo "\t\t</p>\n";
  43. echo "\t</font>\n";
  44. }
  45. ?>
  46. <p>
  47. <table width="100%">
  48. <tr>
  49. <td align=center>
  50. <a href="browse.php">Back to Browse</a>
  51. </td>
  52. <td align=center>
  53. <a href="index.php">Back to Start</a>
  54. </td>
  55. </tr>
  56. </table>
  57. <?php
  58. pg_foot();
  59. ?>