Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- $dbhost = 'oniddb.cws.oregonstate.edu';
- $dbname = 'chathamb-db';
- $dbuser = 'chathamb-db';
- $dbpass = 'MxTi7Gu5ie7Jzv2y';
- $mysql_handle = mysql_connect($dbhost, $dbuser, $dbpass)
- or die("Error connecting to database server");
- mysql_select_db($dbname, $mysql_handle)
- or die("Error selecting database: $dbname");
- ?>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
- <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
- </head>
- <body>
- <center>
- <h2>Sorry, it looks like you lost...</h2>
- <h3>Your score was: <?php echo $_SESSION["score"] ?>! If this was your highest score, it has been saved.</h3>
- <button id="restartButton" type="button" onclick="restart()" name="restart" class="btn btn-info">Restart</button>
- </center>
- </body>
- </html>
- <script>
- //when restart is clicked
- function restart()
- {
- header("http://web.engr.oregonstate.edu/~chathamb/CodingPractice/ImprovedPongGame/game.php");
- }
- </script>
- <?php
- mysql_close($mysql_handle);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement