Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host = 'localhost';
- $user = 'user';
- $password = 'password';
- $db_name = 'db_name';
- $connect = mysqli_connect($host, $user, $password);
- mysqli_select_db($connect, $db_name) or die ("Couldn't connect");
- function roll_die() {
- $throw = rand(1, 6);
- return $throw;
- }
- function get_subtotal() {
- $query = "SELECT * FROM throws";
- $result = mysqli_query($connect, $query);
- while ($row = $result->fetch_assoc()) {
- echo $row['value']."<br>";
- }
- }
- ?>
Add Comment
Please, Sign In to add comment