Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form method = "post">
- Student ID <input type="text" name = "student_id"> <br>
- OR NO <input type = "text" name = "or_no"> <br>
- Requests
- <input type = "checkbox" name = "ac_description[]" value = "Replacement_of_Registration"> Replacement_of_Registration <br>
- <input type = "checkbox" name = "ac_description[]" value = "Good Moral Certificate">Good Moral Certificate <br>
- <input type = "checkbox" name = "ac_description[]" value = "Honorable Dismissal ">Honorable Dismissal <br>
- <input type = "checkbox" name = "ac_description[]" value = "Transcript of Record">Transcript of Record <br>
- <input type = "checkbox" name = "ac_description[]" value = "Diploma">Diploma<br>
- <input type = "checkbox" name = "ac_description[]" value = "CUE Request"> CUE Request <br>
- <input type = "checkbox" name = "ac_description[]" value = "CMI Request">CMI Request <br>
- <input type = "checkbox" name = "ac_description[]" value = "Entrance Exam">Entrance Exam <br>
- <input type = "checkbox" name = "ac_description[]" value = "School fees-Medical/Dental Laboratory ">School fees-Medical/Dental Laboratory <br>
- <input type = "checkbox" name = "ac_description[]" value = "School fees-Transcript/Honorable">School fees-Transcript/Honorable<br>
- <input type = "checkbox" name = "ac_description[]" value = "School fees-Library">School fees-Library <br>
- <input type = "checkbox" name = "ac_description[]" value = "Affiliation Fees">Affiliation Fees <br>
- <input type = "submit" name = "submit" value = "Save">
- </form>
- </body>
- </html>
- <?php
- if ($_POST["submit"]=="Save")
- {
- $student_id = $_POST["student_id"];
- $or_no = $_POST["or_no"];
- $ac_description = $_POST["ac_description"];
- print_r ($ac_description);
- $status1="processing";
- $qty=1;
- $col_credit = 80;
- $dep_credit = 80;
- $col_debit = 0;
- $dep_debit = 0;
- $db = mysqli_connect ("localhost", "root", "turtledove", "accounting");
- if (!$db)
- {
- die ("ERROR!!!!!!>>>");
- }
- if ($ac_description)
- {
- foreach ($ac_description as $ac)
- {
- mysqli_query($db, "insert into or_header (detail_no,or_ no, ac_description, student_id, date1, status1, qty,
- col_credit, col_debit, dep_credit, dep_debit)
- values (".$or_no.", '".mysqli_real_escape_string($db,$ac)."',".$student_id.",curdate(),".$status1.",
- ".$qty.",".$col_credit.",".$col_debit.",".$dep_credit.",".$dep_debit.")");
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement