Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>الرد على التذكرة</title>
- <style>
- .table, tr, td {border: 1px solid black; text-align:center}
- .contents { position:static}
- p1 {font-size:15px; font-weight:bolder}
- .inputresponse {resize:none}
- </style>
- </head>
- <body class="body">
- <div class="contents" align="right">
- <?php
- include 'config.php';
- $sql = "SELECT * FROM contact ORDER BY id";
- $con->set_charset('utf8');
- $users = mysqli_query($con,$sql);
- if(isset($_POST['send'])){
- $repsonse = $_POST['response'];
- if(!isset($_GET['id'])){
- $result = ("UPDATE contact SET response ='$response' WHERE id= $row[id]");
- $rst = mysqli_query($con,$result);
- }
- }
- ?>
- <table class="table">
- <?php
- while($row = mysqli_fetch_array($users)) {
- ?>
- <form id="<?php echo $row[id] ?>" method="post" name="respone" action="addresponse.php">
- <tr>
- <td> <p1> الإسم </p1> </td>
- <tr>
- <td> <?php echo $row[name] ?> </td>
- </tr>
- <tr>
- <td> <p1> رقم التذكرة</p1> </td>
- </tr>
- <tr>
- <td> <?php echo $row[ticketnumber] ?> </td>
- </tr>
- <tr>
- <td> <p1> الإيميل</p1> </td>
- </tr>
- <tr>
- <td> <?php echo $row[email] ?> </td>
- </tr>
- <tr>
- <td> <p1> الموضوع </p1> </td>
- </tr>
- <tr>
- <td> <?php echo $row[subject] ?> </td>
- </tr>
- <tr>
- <td> <p1> الرد </p1> </td>
- </tr>
- <tr>
- <td> <textarea name="response" rows="5" dir="rtl" class="inputresponse"> </textarea> </td>
- </tr>
- <tr>
- <td> <input type="submit" value="إرسال" name="send"> </td>
- </tr>
- <tr>
- <td>
- <?php
- }
- if($rst){
- echo "تم الإرسال";
- } else {
- echo " لم يتم الإرسال";
- }
- ?>
- </form>
- </table>
- </div>
- </body>
- </html>
Add Comment
Please, Sign In to add comment