+ 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>

8th Jun 2020, 9:48 AM
Yokahana
Yokahana - avatar
1 Réponse
0
you should add global variable to save the current points or exp
26th Jun 2020, 3:32 AM
John Nehry C. Dedoro
John Nehry C. Dedoro - avatar