Re: [PHP] counter problem

2003-01-05 Thread Anthony Ritter
Hi Mike, I tried the first script you posted on the NG. This is what happens when I copy and paste your script: The formbox appears. I insert a number. I click submit. The number reverts back to 0. The URL script that you sent me works fine. I'm using MS Win 98/ Apache / PHP 4 Please advise if

Re: [PHP] counter problem

2003-01-04 Thread Michael J. Pawlowsky
I won't keep it up long... but go here... you will see it works... http://rc.mikeathome.net:8080/test/index.php *** REPLY SEPARATOR *** On 04/01/2003 at 7:17 PM Anthony Ritter wrote: >Michael J. Pawlowsky wrote in message: > >> This also works with the ternary operator...

Re: [PHP] counter problem

2003-01-04 Thread Anthony Ritter
Michael J. Pawlowsky wrote in message: > This also works with the ternary operator... . No dice Michael. I treid both your scripts. The formbox comes up. I enter a number. I hit submit. The box clears out the entered number without any mes

Re: [PHP] counter problem

2003-01-04 Thread Michael J. Pawlowsky
This also works with the ternary operator... I don't think it likes the ++ because it doesn't know the type yet. $numtoguess) $message="Your guess was too high."; else $message="That is the correct number."; if(isset($_POST['guess'])) $guess=(int)$_POST['guess']; else

Re: [PHP] counter problem

2003-01-04 Thread Michael J. Pawlowsky
Use this... enjoy $numtoguess) $message="Your guess was too high."; else $message="That is the correct number."; if(isset($_POST['guess'])) $guess=(int)$_POST['guess']; else $guess=0; print_r($_POST); ?> Guess number: Type y

[PHP] counter problem

2003-01-04 Thread Anthony Ritter
The following script is found in Matt Zandstra's book on PHP (Sams) on page 160. He's explaining forms with PHP and has hard coded a value - 42. He also is explaining a hidden fleld where the user can submit the number and each time the user hits submit in the formbox, the counter will register t