Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. <form action= "e.php" method="post">
  2. <table class="table">
  3.  
  4. <thead>
  5. <tr class="active">
  6. <!-- <td><input type="checkbox" id = "chckHead" /> Select</td>-->
  7. <td>Patient Name</td>
  8. <td>Patient ID</td>
  9. <td>Medicin</td>
  10. <td>DONE</td>
  11. <td>Male Side</td>
  12.  
  13.  
  14. </tr>
  15. </thead>
  16.  
  17. <tbody>
  18.  
  19. <?php
  20. $sql="SELECT * from medicin_refill";
  21. $result = mysqli_query($dbhandle,$sql);
  22. while( $row = mysqli_fetch_array($result,MYSQLI_ASSOC)){
  23. Print ("<tr class='warning'>");
  24.  
  25. //print("<td><input type='checkbox' class = 'chcktbl' id='ch' /></d>");
  26.  
  27. print("<td>".$login_session2."</td>");
  28. print("<td>".$row['pname']."</td>");
  29. print("<td>".$row['medicin']."</td>");
  30. if ($row['status']== "DONE" or $row['status']=="Male Side"){
  31. print("<td><button name='button1' id='button1' class='btn btn-secondry btn-sm btn-block' disabled>Updated</button></td>");
  32. print("<td><button name='button2' id='button2' class='btn btn-secondry btn-sm btn-block' disabled>Updated</button></td>");}
  33.  
  34.  
  35. else{
  36. print("<input type='hidden' name='action'/>");
  37. print("<td><input type='submit' id='button1' value='DONE' ></button></td>");
  38. print("<td><input type='submit' id='button1' value='Male Side' ></td>");}
  39. }
  40.  
  41. ?>
  42.  
  43. <?php
  44. include("configure.php");
  45. include('session.php');
  46. include('employee session.php');
  47. include('req.php');
  48.  
  49.  
  50.  
  51. if (isset($_POST['action'])) {
  52. $result = mysqli_query($dbhandle,$query);
  53. mysqli_query($dbhandle,"UPDATE medicin_refill SET status='DONE' WHERE id='$login_session2'") or die(mysqli_error($dbhandle));}
  54.  
  55. else if (isset($_POST['action'])) {
  56.  
  57. $result = mysqli_query($dbhandle,$query);
  58. mysqli_query($dbhandle,"UPDATE medicin_refill SET status='Male Side' WHERE id='$login_session2'") or die(mysqli_error($dbhandle));}
  59.  
  60. header("Location:employee page loged.php");
  61.  
  62. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement