+ 1
How do i make guess the logo game in PHP where users can log in and earn xps
<html> <head> </head> <title> </title> <body> <?php session_start(); // Page was not reloaded via a button press if (!isset($_POST['add'])) { $_SESSION['attnum'] = 1; // Reset counter } ?> <h2>Earned Xps: <?php echo $_SESSION['attnum']+= ?> </h2><br> <img src="logo1.jpg" width="150" height="150" style="border:1px black" alt="Stockoverflow Logo"> <p></p> <form method="post"> <input type="text" required placeholder="GUESS THE LOGO" pattern=".{4,}" title="CAPITAL LETTERS ONLY"/> <br><br> <input type="submit" name="add"/><br><!-- every time they press the submit button i want their xp to increase `by .10 --> </form> </body> </html>
1 Answer
0
you should add global variable to save the current points or exp