Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(!isset($_POST['guess']) && !isset($_SESSION['rand'])) {
- $_SESSION['rand'] = rand(1,100);
- $_SESSION['counter'] = 0;
- ?>
- <h4 style="text-align:left;">I'm thinking of a number between 1 and 100. What is it?</h4>
- <form action="guess.php" method="post">
- What's your guess?<br /><input type="text" id="guess" name="guess" /><br />
- <input type="submit" value="Submit Guess" />
- </form>
- <?php
- $_SESSION['guess'] = $_POST['guess'];
- } else {
Add Comment
Please, Sign In to add comment