Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include_once("public_html/dreamconnect.php");
- $title = "Welcome to the website";
- html_begin($title,$title);
- ?>
- <p>Simple Staff Count </p>
- <?php
- $servername = "localhost";
- $username = "****";
- $password = "****";
- $dbname = "mydb";
- $conn_id = mysqli_connect($servername, $username, $password);
- dream_connect()
- or exit();
- $query = "select * FROM staff";
- $result_id = mysqli_query($conn_id, $query);
- print("<table>n");
- while($row = mysqli_fetch_row($result_id))
- {
- print("<tr>n");
- for($i = 0; $i < mysqli_num_fields($result_id); $i++)
- {
- printf("<td>%s</td>n",htmlspecialchars($row[$i]));
- }
- print("</tr>n");
- }
- mysqli_free_result($result_id);
- print("</table>n");
- html_end();
- ?>
Add Comment
Please, Sign In to add comment