0

I'm working on a web application that display information from a database. I want to display a table in HTML page using PHP and SQL Server Database but when I press the button nothing appears and I don't know why. Here's my code :

<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel ="stylesheet" href="style_wbr.css"/>
        <title>PORTAIL</title>
    </head>
<body>

  <h1 id ="titre">Reporting</h1>
  <img id="image" src="http://www.tessares.net/wp-content/uploads/2016/06/sa.png" >



  <form method="post" action="/authentification.php">
  <div class="quit">
        <input type="submit" name="quit" id="quit" value="Quitter"/>
  </div>

  <div>
    <input type="button" id ="historique" name="historique" value="Historique"/>
  </div>

  </form>
<br></br>
<br></br>

<?php

if(isset($_POST['historique']))
{

  $rqt = "SELECT TOP (10) DEP_Operation.id, DEP_Operation.operationDate, DEP_Users.fullName
FROM  DEP_Operation INNER JOIN
               DEP_Products ON DEP_Operation.productID = DEP_Products.id INNER JOIN
               DEP_Errors ON DEP_Operation.errorID = DEP_Errors.id INNER JOIN
               DEP_Users ON DEP_Operation.personInCharge = DEP_Users.id";
      $stmt = mssql_query($rqt);
?>
<table id="tab" border="1">


                <tr>
                    <th>id</th>
                    <th>Date</th>
                    <th>Dépanneur</th>
                </tr>
<?php

      while ($data = mssql_fetch_assoc($stmt))
      {

          ?>
          <tr>

                    <td><?php echo utf8_encode ($data['id']);?></td>
                    <td><?php echo utf8_encode ($data['operationDate']);?></td>
                    <td><?php echo utf8_encode ($data['fullName']);?></td>
          </tr>
<?php } ?>

</table>
<?php
}
?>



</body>


</html>

I deleted the code of the database connection because I have no issue with that, and when I run the code without the button test it works. So the issue is with the button test. Can you help me with this issue please?

jradich1234
  • 1,410
  • 5
  • 24
  • 29
Brainiac
  • 11
  • 1
  • 8

0 Answers0