Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- $servername = "localhost";
- $username = "root";
- $password = "htq6m2";
- $dbname = "transactions";
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $query = "SELECT sum(points) AS points FROM transactions WHERE username = '".mysqli_real_escape_string($conn,$_SESSION['userid'])."'";
- $result = mysqli_query($conn, $query);
- $row = mysqli_fetch_assoc($result);
- if ($_GET["credits"] > $results) {
- echo("You don't have enough credits for that bet!");
- } else {
- echo("Nice you've got enough credits!")
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement