PHP errors - strange variables causing form corruption?
| From: | Peter Westergaard | Date: | Wed, 30 Jul 2003 21:09:14 +0000 |
| Subject: | PHP errors - strange variables causing form corruption? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-29583@lists.php.net to get a copy of this message | ||
I cobbled together a really quick and dirty PHP to run a "dice-rolling"
simulator.
Sometimes, it works great. Other times, it gets into some weird
state, when strange extra characters are injected into variable values
and/or variable NAMES even!
You can see an uploaded version at http://www.westergaard.ca/dierolling.
php - if you key in something like "30d100+40 k20" (by which I mean
roll 30 "100-sided" dice, keep the best 20, and add 40 to the resulting
sum), then click "roll" a few times, you'll probably notice that
at some point, the string "+/-" in the help text disappears. The
next time you click "Roll" the system will stop giving roll results,
will reset to rolling "3d6", and will ignore input.
I've struggled with this till I'm red in the face. I'm stumped.
Please, Help! :)
I've also uploaded the source at http://www.westergaard.ca/dierolling.
phpsrc
The webserver at westergaard.ca is Linux, but I've also tested this
on a Win2000 IIS webserver, and have the exact same results.
If anyone has any clue what is going on, I'd really appreciate a
suggestion.
Thanks!
Peter Westergaard
peter@westergaard.ca ### ICQ#: 10294457
http://www.westergaard.ca/ ### http://courtly.livejournal.com
----------
'Our response to being bored and rich is not to discard our possessions
and live more simply,
but to buy more stuff to reduce the space in which we might contemplate
our shame.'
- Stuart Jeffries "Robots without a cause"
===================================================================
EASY and FREE access to your email anywhere: http://Mailreader.com/
===================================================================