Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
| sidebar [2019/08/10 17:47] – rileys | sidebar [2020/03/26 19:35] (current) – removed rileys | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ~~NOCACHE~~ | ||
| - | ====== TSD Availability ====== | ||
| - | <PHP> | ||
| - | $servername = " | ||
| - | $username = " | ||
| - | $password = " | ||
| - | $dbname = " | ||
| - | $statusStyle = " | ||
| - | // Create connection | ||
| - | $conn = mysqli_connect($servername, | ||
| - | // Check connection | ||
| - | if (!$conn) { | ||
| - | die(" | ||
| - | } | ||
| - | |||
| - | $sql = " | ||
| - | $result = mysqli_query($conn, | ||
| - | |||
| - | if (mysqli_num_rows($result) > 0) { | ||
| - | // output data of each row | ||
| - | while($row = mysqli_fetch_assoc($result)) { | ||
| - | echo "<p style=' | ||
| - | echo $row[" | ||
| - | echo "</ | ||
| - | echo "< | ||
| - | echo $row[" | ||
| - | echo "</ | ||
| - | } | ||
| - | } else { | ||
| - | echo "0 results"; | ||
| - | } | ||
| - | |||
| - | mysqli_close($conn); | ||
| - | </ | ||