Hi,
I have a question, I'm writing a game in php. Currently the answer of the question is in a hidden <input> box called "tjo"!
and when you click submit the page is reopened using
echo"<html><body>";
...
if(pg=="chk") {
include("./answer.php");
} else {
include("./question.php");
}
...
echo"</body></html>";
The problem is, when you view the source code you'll find the answer the in page in the hidden input box.
My question is, how can I send the $answer without using a input box so that the answer is NOT in the <html> code?
--- question.php ---
<form action=\"$PHPSELF?co=$co\" method=\"post\">
<input type=\"hidden\" name=\"pg\" value=\"chk\">
...
$answer = "$number1$number2$number3";
<input type=\"hidden\" name=\"tjo\" value=\"$answer\">
...
<select name=\"c1\" size=\"1\">...</select>
<select name=\"c2\" size=\"1\">...</select>
<select name=\"c3\" size=\"1\">...</select>
...
<input type=\"submit\" name=\"send\" value=\"Submit\">
</form>
--- answer.php ---
$tjo=="$c1$c2$c3";
if($answer==$guess) { echo" you win "; } else { echo"you lost"; }