emiliolorenzo30 0 Newbie Poster
                                        <?php
                                        require('cns.php');
                                        $conn = mysqli_connect("localhost", "root", "", "cns");
                                        if ($conn-> connect_error) 
                                        {
                                            die ("Connection failed:". $conn-> connect_error);
                                        }

                                        $sql = "SELECT cl_id, cl_name, cl_service_description, cl_contact, cl_dept,status, expiry_date from contract_list";
                                        $result = $conn-> query($sql);

                                        if($result->num_rows > 0)
                                        {
                                            while($row = $result-> fetch_assoc())
                                            {
                                                  echo "<td>$row[cl_id]</td>";
                                                  echo "<td>$row[cl_name]</td>";
                                                  echo "<td> $row[cl_service_description]</td>";
                                                  echo "<td>$row[cl_dept]<td>";
                                                  echo"$row[status]";
                                                  echo "<td>$row[cl_contact]</td>";
                                                  echo "<td>$row[expiry_date]</td>";
                                                  echo "<td></td>";
                                                  echo "<td><div class=table-data-feature>";
                                                      echo "<button class='item' data-toggle='tooltip' data-placement='top' title='send'>";
                                                          echo "<i class=zmdi zmdi-mail-send></i>";
                                                      echo "</button>";
                                                      echo "<button class=item data-toggle=tooltip data-placement=top title=Edit>";
                                                          echo "<i class=zmdi zmdi-edit></i>";
                                                      echo "</button>";
                                                      echo "<button class=item data-toggle=tooltip data-placement=top title=Delete>";
                                                          echo"<i class=zmdi zmdi-delete></i>";
                                                      echo "</button>";
                                                      echo "<button class=item data-toggle=tooltip data-placement=top title=More>";
                                                          echo"<i class=zmdi zmdi-more></i>";
                                                      echo"</button>";
                                                  echo "</div>";
                                              echo "</td>";
                                                  echo "<tr class=spacer></tr>";

                                            }
                                        }
                                            ?>