PageRenderTime 47ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/Admin/updatedoctor.php

https://bitbucket.org/kenzone/hairloss
PHP | 148 lines | 116 code | 32 blank | 0 comment | 1 complexity | 84b62411409bbea153aefcab192a8438 MD5 | raw file
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Untitled Document</title>
  6. </head>
  7. <body>
  8. <div>
  9. <?php
  10. $DocID = $_REQUEST['docid'];
  11. include "../config/config.php";
  12. $sql = "SELECT * FROM doctor where ID = '" . $DocID . "'";
  13. $result = mysql_query($sql);
  14. $count =0;
  15. while($row = mysql_fetch_array($result))
  16. {
  17. $clinic_Name=$row['strClinicName'];
  18. }
  19. include "../config/con_close.php";
  20. ?>
  21. <table><tr><td style="padding-top:0px;"><h2>Edit Doctor Detail For <?php echo $clinic_Name; ?></h2>
  22. <br /></td></tr></table>
  23. <?php
  24. $DocID = $_REQUEST['docid'];
  25. if(isset($_POST['btn_Submit']))
  26. {
  27. include "../functions.php";
  28. $clinicname = $_POST['clinicname'];
  29. $address_1 = $_POST['address_1'];
  30. $address_2 = $_POST['address_2'];
  31. $town = $_POST['town'];
  32. $state = $_POST['state'];
  33. $postcode = $_POST['postcode'];
  34. $phone = $_POST['phone'];
  35. update_doctor_table($clinicname,$address_1,$address_2,$town,$state,$postcode,$phone,$DocID);
  36. ?>
  37. <script>
  38. window.close();
  39. </script>
  40. <?php
  41. }
  42. else
  43. {
  44. }
  45. ?>
  46. <?php
  47. $DocID = $_REQUEST['docid'];
  48. include "../config/config.php";
  49. $sql = "SELECT * FROM doctor where ID = '" . $DocID . "'";
  50. $result = mysql_query($sql);
  51. $count =0;
  52. while($row = mysql_fetch_array($result))
  53. {
  54. $clinic_name=$row['strClinicName'];
  55. $address1=$row['strAddress1'];
  56. $address2=$row['strAddress2'];
  57. $town=$row['strTownName'];
  58. $state=$row['strStateName'];
  59. $postcode=$row['strPostcode'];
  60. $phone=$row['strPhone'];
  61. }
  62. include "../config/con_close.php";
  63. ?>
  64. <div>
  65. <form method="post">
  66. <table >
  67. <tr>
  68. <td>Clinic Name</td>
  69. <td>:</td>
  70. <td><input name="clinicname" type="text" value="<?php echo $clinic_name; ?>" size="40" /></td>
  71. </tr>
  72. <tr>
  73. <td>Address</td>
  74. <td>:</td>
  75. <td>
  76. <table>
  77. <tr><td><input name="address_1" type="text" value="<?php echo $address1; ?>" size="40" /></td></tr>
  78. <tr><td><input name="address_2" type="text" value="<?php echo $address2; ?>" size="40" /></td></tr>
  79. </table>
  80. </td>
  81. </tr>
  82. <tr>
  83. <td>Town</td>
  84. <td>:</td>
  85. <td><input name="town" type="text" value="<?php echo $town; ?>" size="40" /></td>
  86. </tr>
  87. <tr>
  88. <td>State</td>
  89. <td>:</td>
  90. <td><input name="state" type="text" value="<?php echo $state; ?>" size="40" /></td>
  91. </tr>
  92. <tr>
  93. <td>Post Code</td>
  94. <td>:</td>
  95. <td>
  96. <input name="postcode" type="text" value="<?php echo $postcode; ?>" size="40" />
  97. </td>
  98. </tr>
  99. <tr>
  100. <td>Phone</td>
  101. <td>:</td>
  102. <td>
  103. <input name="phone" type="text" value="<?php echo $phone; ?>" size="40" />
  104. </td>
  105. </tr>
  106. <tr>
  107. <td colspan="3" style="padding-left:230px;">
  108. <input name="btn_Submit" id="btn_Submit" type="submit" value="Update" />
  109. <!--<input name="btn_Back" type="button" value='Previous' onclick="window.location='test.php'" />-->
  110. </td>
  111. </tr>
  112. </table>
  113. </form>
  114. </div>
  115. </body>
  116. </html>