0

How do i make guess the logo game in PHP where users can log in and earn xps

<p> </p> <p><br />&lt;html&gt;<br />&lt;head&gt;</p> <p>&lt;/head&gt;<br />&lt;title&gt;</p> <p>&lt;/title&gt; <br />&lt;body&gt;<br />&lt;?php<br /> session_start();<br /> // Page was not reloaded via a button press<br /> if (!isset($_POST['add'])) {<br /> $_SESSION['attnum'] = 1; // Reset counter <br /> <br /> }<br />?&gt;</p> <p>&lt;h2&gt;Earned Xps: &lt;?php echo $_SESSION['attnum']+= ?&gt; &lt;/h2&gt;&lt;br&gt;</p> <p>&lt;img src="logo1.jpg" width="150" height="150" style="border:1px black" alt="Stockoverflow Logo"&gt;<br /> &lt;p&gt;&lt;/p&gt;<br /> &lt;form method="post"&gt;<br /> &lt;input type="text" required placeholder="GUESS THE LOGO" pattern=".{4,}" title="CAPITAL LETTERS ONLY"/&gt; &lt;br&gt;&lt;br&gt;<br /> &lt;input type="submit" name="add"/&gt;&lt;br&gt;&lt;!-- every time they press the submit button i want their xp to increase `by .10 --&gt;</p> <p>&lt;/form&gt;<br />&lt;/body&gt;<br />&lt;/html&gt;</p> <p> </p>

8th Jun 2020, 9:47 AM
Yokahana
Yokahana - avatar
0 Antworten