Advertisement
Guest User

Untitled

a guest
Feb 4th, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>الرد على التذكرة</title>
  6. <style>
  7.  
  8. .table, tr, td {border: 1px solid black; text-align:center}
  9. .contents { position:static}
  10. p1 {font-size:15px; font-weight:bolder}
  11. .inputresponse {resize:none}
  12. </style>
  13. </head>
  14. <body class="body">
  15. <div class="contents" align="right">
  16. <?php
  17.  
  18. include 'config.php';
  19.  
  20.  
  21. $sql = "SELECT * FROM contact";
  22.  
  23. $con->set_charset('utf8');
  24. $users = mysqli_query($con,$sql);
  25.  
  26.  
  27. while($row = mysqli_fetch_assoc($users)) {
  28. ?>
  29.  
  30. <table class="table">
  31. <form id="<?php echo $row[id] ?>" method="post" name="respone" action="addresponse.php">
  32. <tr>
  33. <td> <p1> الإسم </p1> </td>
  34. <tr>
  35. <td> <?php echo $row[name] ?> </td>
  36. </tr>
  37. <tr>
  38. <td> <p1> رقم التذكرة</p1> </td>
  39. </tr>
  40. <tr>
  41. <td> <?php echo $row[ticketnumber] ?> </td>
  42. </tr>
  43. <tr>
  44. <td> <p1> الإيميل</p1> </td>
  45. </tr>
  46. <tr>
  47. <td> <?php echo $row[email] ?> </td>
  48. </tr>
  49. <tr>
  50. <td> <p1> الموضوع </p1> </td>
  51. </tr>
  52. <tr>
  53. <td> <?php echo $row[subject] ?> </td>
  54. </tr>
  55. <tr>
  56. <td> <p1> الرد </p1> </td>
  57. </tr>
  58. <tr>
  59. <td> <textarea name="response" rows="5" dir="rtl" class="inputresponse"> </textarea> </td>
  60. </tr>
  61. <tr>
  62. <td> <input type="submit" value="إرسال" name="send"> </td>
  63. </tr>
  64. <tr>
  65. <td>
  66. <?php
  67. }
  68. if(isset($_POST['send'], $row['id'])){
  69.  
  70. $row[response] = $_POST['response'];
  71.  
  72. $result = ("UPDATE contact SET response ='$row[response]' WHERE id= $row[id]");
  73.  
  74. $rst = mysqli_query($con,$result);
  75.  
  76. if($rst){
  77.  
  78. echo " <p1> تم الإرسال </p1>";
  79.  
  80. } else {
  81.  
  82. echo " <p1> لم يتم الإرسال </p1>";
  83. }
  84.  
  85. }
  86.  
  87. ?>
  88. </form>
  89. </table>
  90. </div>
  91. </body>
  92. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement