Advertisement
Guest User

Untitled

a guest
Nov 5th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.16 KB | None | 0 0
  1. <div id="myform">
  2. <p align="center">
  3. <strong>
  4. Add information for new teacher here
  5. </strong></p>
  6. <form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
  7. <table align="center" id="forms">
  8. <tr valign="baseline">
  9. <td nowrap="nowrap" align="right">First name:</td>
  10. <td><input type="text" name="first_name" value="" size="32" /></td>
  11. </tr>
  12. <tr valign="baseline">
  13. <td nowrap="nowrap" align="right">Last name:</td>
  14. <td><input type="text" name="last_name" value="" size="32" /></td>
  15. </tr>
  16. <tr valign="baseline">
  17. <td nowrap="nowrap" align="right">Subjects:</td>
  18. <td><input type="text" name="subjects" value="" size="32" /></td>
  19. </tr>
  20. <tr valign="baseline">
  21. <td nowrap="nowrap" align="right">Phonenumber:</td>
  22. <td><input type="text" name="phonenumber" value="" size="32" /></td>
  23. </tr>
  24. <tr valign="baseline">
  25. <td nowrap="nowrap" align="right">Email:</td>
  26. <td><input type="text" name="email" value="" size="32" /></td>
  27. </tr>
  28. <tr valign="baseline">
  29. <td nowrap="nowrap" align="right">Username:</td>
  30. <td><input type="text" name="username" value="" size="32" /></td>
  31. </tr>
  32. <tr valign="baseline">
  33. <td nowrap="nowrap" align="right">Password:</td>
  34. <td><input type="text" name="password" value="" size="32" /></td>
  35. </tr>
  36. <tr valign="baseline">
  37. <td nowrap="nowrap" align="right">&nbsp;</td>
  38. <td><input type="submit" value="Insert record" id="hideit"/></td>
  39. </tr>
  40. </table>
  41. <input type="hidden" name="MM_insert" value="form1" />
  42. </form>
  43. <p>&nbsp;</p>
  44. </div>
  45.  
  46. <p align="center">
  47. <strong>
  48. List of teachers in Minaki Sec school
  49. </strong></p>
  50. <table border="1" align="center" class="altrowstable" id="alternatecolor">
  51. <tr id="row">
  52. <th>teacher id</th>
  53. <th>first name</th>
  54. <th>last name</th>
  55. <th>subjects</th>
  56. <th>Phonenumber</th>
  57. <th>Email</th>
  58. <th>username</th>
  59. <th>password</th>
  60. <th>Edit</th>
  61. <th>Delete</th>
  62. <th>Details</th>
  63. </tr>
  64. <?php do { ?>
  65. <tr>
  66. <td><?php echo $row_teacherrec['teacher_id']; ?></td>
  67. <td><?php echo $row_teacherrec['first_name']; ?></td>
  68. <td><?php echo $row_teacherrec['last_name']; ?></td>
  69. <td><?php echo $row_teacherrec['subjects']; ?></td>
  70. <td><?php echo $row_teacherrec['phonenumber']; ?></td>
  71. <td><?php echo $row_teacherrec['email']; ?></td>
  72. <td><?php echo $row_teacherrec['username']; ?></td>
  73. <td><?php echo $row_teacherrec['password']; ?></td>
  74. <td><button onclick="location.href= 'edit_teacher.php? teacher_id=<?php echo $row_teacherrec['teacher_id']; ?>'">Edit</button></td>
  75. <td><button onclick="location.href= 'delete_teacher.php? teacher_id=<?php echo $row_teacherrec['teacher_id']; ?>'">Delete</button></td>
  76. <td><button onclick="location.href= 'edit_teacher.php? teacher_id=<?php echo $row_teacherrec['teacher_id']; ?>'">Details</button></td>
  77. </tr>
  78. <?php } while ($row_teacherrec = mysql_fetch_assoc($teacherrec)); ?>
  79. <tr>
  80. <td colspan="8"></td>
  81. <td colspan="6" align="center"><button id="showit" onclick="location.href='teacher.php'">+Add new Teacher</button></td>
  82. </tr>
  83. </table>
  84.  
  85. $(function(){
  86. $('button#showit').on('click',function(){
  87. $('#myform').show();
  88. });
  89. });
  90.  
  91. <div id="myform" style="display:none">
  92. .....
  93.  
  94. <div id="myform" style="display:none">
  95. // contents here
  96. </div>
  97.  
  98. <div id="myform" style="display:none">
  99.  
  100. $(document).ready(function(){
  101. // hide form on page load
  102. $('#myform').hide();
  103.  
  104. // when button is pressed
  105. $('button').on('click',function(){
  106. $('#myform').show();
  107. });
  108. });
  109.  
  110. <div id="myform" style="display:none;">
  111.  
  112. <button id="showit">+Add new Teacher</button>
  113.  
  114. $(document).ready(function(){
  115. $("#showit").click(function(){
  116. $("#myform").css("display","block");
  117. });
  118. });
  119.  
  120. $(function(){
  121. $('.button_name').click(function(){
  122. $('#myform').show();
  123. });
  124. });
  125.  
  126.  
  127.  
  128.  
  129.  
  130. <button class="button_name">
  131.  
  132.  
  133. <div id="myform" style="display:none">
  134.  
  135. function new_disp(){
  136. document.getElementById('myform').style.display='block';
  137. }
  138.  
  139.  
  140.  
  141.  
  142. <button onclick='new_disp();'>
  143.  
  144.  
  145. <div id="myform" style="display:none">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement