Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- if (!isset($_SESSION['count'])) {
- $_SESSION['count'] = 0;
- } else {
- $_SESSION['count']++;
- }
- echo "This page has refreshed: ".$_SESSION['count']." times.<br>";
- $svname = "185.38.148.82";
- $username = "zeniwork_hyper";
- $password = "Ou5BzsvF6H3A";
- $dbname = "zeniwork_tinytown";
- $tableRefresh = 0;
- $con = mysqli_connect( $svname, $username, $password, $dbname );
- if (!$con) {
- die( "Connection failed due to: " . mysqli_connect_error());
- }
- echo "Connected to database! <br>";
- echo "<table>";
- echo "<tr><th>ID</th><th>Name</th><th>Value</th></tr>";
- $rtMarket = "SELECT * FROM test";
- $rtResult = mysqli_query($con, $rtMarket);
- while($row = mysqli_fetch_assoc($rtResult)) {
- $id = $row["ID"];
- $name = $row["name"];
- $value = $row["value"];
- echo "<tr><td>".$id."</td><td>".$name."</td><td>".$value."</td></tr>";
- }
- echo "</table>";
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title>Example PHP</title>
- <link href="main.css" rel="stylesheet" type="text/css">
- <meta charset="utf-8">
- <meta http-equiv="refresh" content="10">
- <script>
- </script>
- </head>
- <body>
- <div class="main-container">
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement