Advertisement
Guest User

Untitled

a guest
Aug 21st, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.63 KB | None | 0 0
  1. <form method = "post">
  2. Student ID <input type="text" name = "student_id"> <br>
  3. OR NO <input type = "text" name = "or_no"> <br>
  4. Requests
  5. <input type = "checkbox" name = "ac_description[]" value = "Replacement_of_Registration"> Replacement_of_Registration <br>
  6. <input type = "checkbox" name = "ac_description[]" value = "Good Moral Certificate">Good Moral Certificate <br>
  7. <input type = "checkbox" name = "ac_description[]" value = "Honorable Dismissal ">Honorable Dismissal <br>
  8. <input type = "checkbox" name = "ac_description[]" value = "Transcript of Record">Transcript of Record <br>
  9. <input type = "checkbox" name = "ac_description[]" value = "Diploma">Diploma<br>
  10. <input type = "checkbox" name = "ac_description[]" value = "CUE Request"> CUE Request <br>
  11. <input type = "checkbox" name = "ac_description[]" value = "CMI Request">CMI Request <br>
  12. <input type = "checkbox" name = "ac_description[]" value = "Entrance Exam">Entrance Exam <br>
  13. <input type = "checkbox" name = "ac_description[]" value = "School fees-Medical/Dental Laboratory ">School fees-Medical/Dental Laboratory <br>
  14. <input type = "checkbox" name = "ac_description[]" value = "School fees-Transcript/Honorable">School fees-Transcript/Honorable<br>
  15. <input type = "checkbox" name = "ac_description[]" value = "School fees-Library">School fees-Library <br>
  16. <input type = "checkbox" name = "ac_description[]" value = "Affiliation Fees">Affiliation Fees <br>
  17. <input type = "submit" name = "submit" value = "Save">
  18. </form>
  19. </body>
  20. </html>
  21.  
  22. <?php
  23. if ($_POST["submit"]=="Save")
  24. {
  25. $student_id = $_POST["student_id"];
  26. $or_no = $_POST["or_no"];
  27. $ac_description = $_POST["ac_description"];
  28. print_r ($ac_description);
  29. $status1="processing";
  30. $qty=1;
  31. $col_credit = 80;
  32. $dep_credit = 80;
  33. $col_debit = 0;
  34. $dep_debit = 0;
  35. $db = mysqli_connect ("localhost", "root", "turtledove", "accounting");
  36. if (!$db)
  37. {
  38. die ("ERROR!!!!!!>>>");
  39. }
  40. if ($ac_description)
  41. {
  42. foreach ($ac_description as $ac)
  43. {
  44. mysqli_query($db, "insert into or_header (detail_no,or_ no, ac_description, student_id, date1, status1, qty,
  45. col_credit, col_debit, dep_credit, dep_debit)
  46. values (".$or_no.", '".mysqli_real_escape_string($db,$ac)."',".$student_id.",curdate(),".$status1.",
  47. ".$qty.",".$col_credit.",".$col_debit.",".$dep_credit.",".$dep_debit.")");
  48.  
  49. }
  50.  
  51.  
  52. }
  53. }
  54. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement