|
Oops, something didn't work out there for the code blocks.
So, like hangman, but no limit?
First, having the $GameAnswer passed through the form itself kind of defeats the purpose. Since it's harcoded in script anyway, I'd suggest leaving it as that and not providing it to the user. Just compare what you have been given so far.
Which leads to the question of tracking the user entries so far. HTTP itself is stateless, so we need to persist the data in another fashion. Options are either to use sessions, or to pass them through the form.
Have you covered sessions? Have you covered arrays?
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
|