Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once 'connection1.php';
- ?>
- <html>
- <link rel="stylesheet" type="text/css" href='https://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css'/>
- <?php
- $sql="SELECT * FROM borang_kepuasan";
- $result=mysqli_query($conn,$sql);
- echo "<table id='example' class='display' cellspacing='1' width='100%'>";
- echo "<thead>";
- echo "<tr>";
- echo "<td>Soalan 1</td>";
- echo "<td>Soalan 2</td>";
- echo "<td>Soalan 3</td>";
- echo "<td>Soalan 4</td>";
- echo "<td>Soalan 5</td>";
- echo "<td>Soalan 6</td>";
- echo "<td>Soalan 7</td>";
- echo "<td> Nota / Testimoni </td>";
- echo "</tr>";
- echo "</thead>";
- echo "<tbody>";
- if (mysqli_num_rows($result) > 0) {
- while ($row = mysqli_fetch_assoc($result)) {
- echo "<tr>";
- echo "<td>$row[soalan1]</td>";
- echo "<td>$row[soalan2]</td>";
- echo "<td>$row[soalan3]</td>";
- echo "<td>$row[soalan4]</td>";
- echo "<td>$row[soalan5]</td>";
- echo "<td>$row[soalan6]</td>";
- echo "<td>$row[soalan7]</td>";
- echo "<td>$row[nota]</td>";
- echo "</tr>";
- }
- } else {
- echo "0 results";
- }
- echo "</tbody>";
- echo "</table>";
- echo "<center>";
- echo "<table>";
- echo "<tr>";
- echo "<td>";
- echo "<button style=height:30px width:80px value=Kembali onClick=location.href='admin1.php'>";
- echo "Kembali";
- echo "</button>";
- echo "</td>";
- echo "<td>";
- echo "<button style=height:30px width:80px value=Log Out onClick=location.href='logout.php'>";
- echo "Log Out";
- echo "</a>";
- echo "</button>";
- echo "</center>";
- ?>
- </html>
- <script src='//code.jquery.com/jquery-1.12.4.js'></script>
- <script src='https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js'></script>
- <script>
- $('#example').DataTable();
- </script>
- <?php
- $servername = "localhost";
- $username = "dweetcom";
- $password = "8qXwm217Mf";
- // Create connection
- $conn = new mysqli($servername, $username, $password) ;
- if (mysqli_connect_errno()) {
- echo "Failed to connect to MySQL: " . mysqli_connect_error();
- }
- @mysqli_select_db("dweetcom_borang",$conn);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement