in reply to Re^2: having trouble with simple math game
in thread having trouble with simple math game
I figured out what is wrong, but I am not exactly sure how to fix. So I changed the random numbers so that they are no longer random... $num1=20; and $num2=12; and with that it was able to read the input... the problem is with using a random number each time i press submit the random number changes, therefore the answer changes. I need to figure out to store the random values ($num1 and $num2) into another scalar variable (i.e. $a and $b) so that the random numbers don't change when I hit submit. I can't figure out how to do it though? any help would be nice. and just for an fyi, you can't put
$num1 =$a; $num2=$b;
because $a and $b will equal random numbers. And I also tried
and that still didn't work, any help would be great, thanksmy $a=$num1; my $b=$num2;
|
|---|