PHP form not submitting properly
Posted by: jacobw
Posted on: 2006-05-12 03:09:00
Hey, folks:
For a superhero-themed website, I put together a simple PHP-based game, where you can challenge your friends to a superhero battle by e-mail. You can find it here. It's been up for a few months now, and seems to work fine.
Now I'm putting together a new website with a wizard theme. I'd like to just take the superhero challenge, put it up on my new site, and change the text to make it wizard-themed. But for some reason, when I copy the PHP file over to my new site, it's not working. For some reason, one of the forms is failing to pass the information along, resulting in an error message.
You can find the game on the new site here. Nothing has changed in the PHP, and the first form submits just fine--but even if you fill out the second form completely, you get an error message warning you that the information is not complete. Somehow, that second stage form is not passing the info along.
Can anybody help me figure out what has changed?
Here is the relevant form:
In reply to:<div class = "combatform2">
<form METHOD=POST ACTION="challenge.php">
As the challenger, you get the drop on <?php echo "$challenged_realname"?>, and
attack from a distance.
What is the name of the superpower you attack with (e.g. "laser-fist," "Giggle of Death," <i>etc</i>)?
<input TYPE="text" NAME="attackname1" SIZE="40" MAXLENGTH="50">
What kind of attack is this?
<div class="radioinput" ><input TYPE="radio" NAME="attacktype1" VALUE="explosive"></div> <div class="radiolabel">Explosive
</div>
<div class="radioinput" ><input TYPE="radio" NAME="attacktype1" value="beam"></div> <div class="radiolabel">Focused like a laserbeam
</div>
<div class="radioinput" ><input TYPE="radio" NAME="attacktype1" VALUE="stealthy"> </div> <div class="radiolabel">Stealthily sneaky, sneakily stealthy,
or some combination thereof
</div>
Almost immediately, <?php echo "$challenged_realname"?> counterattacks. Better defend yourself!
What superpower will you use to defend yourself?
<input TYPE="text" NAME="defensename1" SIZE="40" MAXLENGTH="50">
What does this power let you do far more effectively than mere mortals?
<div class="radioinput" ><input TYPE="radio" NAME="defensetype1" VALUE="shield"></div><div class="radiolabel">Throw up a shield
</div>
<div class="radioinput" ><input TYPE="radio" NAME="defensetype1" value="jump"></div><div class="radiolabel">Move out of the way
</div>
<div class="radioinput" ><input TYPE="radio" NAME="defensetype1" VALUE="spin"></div><div class="radiolabel">Spin around before somebody can sneak
up behind you
</div>
Enough of this long-distance combat!
You and <?php echo "$challenged_realname"?> leap at each other, engaging
in fearsome hand-to-hand combat.
What superpower do you use at close range?
<input TYPE="text" NAME="meleename1" SIZE="40" MAXLENGTH="50">
If you were to engage in a lengthy interior monologue in the midst of combat, how might you describe this superpower?
<div class="radioinput" ><input TYPE="radio" NAME="meleetype1" VALUE="rock"></div><div class="radiolabel">More forceful than a falling rock!
</div>
<div class="radioinput" ><input TYPE="radio" NAME="meleetype1" value="scissors"></div><div class="radiolabel">Sharper than titanium scissors!
</div>
<div class="radioinput" ><input TYPE="radio" NAME="meleetype1" VALUE="paper"></div><div class="radiolabel">More enfolding than a slip of paper!
</div>
<INPUT NAME=challengetype TYPE=hidden VALUE="<?php echo "$challengetype"?>">
<INPUT NAME=challenged TYPE=hidden VALUE="<?php echo "$challenged"?>">
<INPUT NAME=challenger TYPE=hidden VALUE="<?php echo "$challenger"?>">
<INPUT NAME=challengesent TYPE=hidden VALUE="<?php echo "$challengesent"?>">
<INPUT NAME=challenged_supername TYPE=hidden VALUE="<?php echo "$challenged_supername"?>">
<INPUT NAME=challenged_email TYPE=hidden VALUE="<?php echo "$challenged_email"?>">
<INPUT NAME=challenged_realname TYPE=hidden VALUE="<?php echo "$challenged_realname"?>">
<INPUT NAME=challenger_realname TYPE=hidden VALUE="<?php echo "$challenger_realname"?>">
<INPUT NAME=challenger_supername TYPE=hidden VALUE="<?php echo "$challenger_supername"?>">
<INPUT NAME=challenger_email TYPE=hidden VALUE="<?php echo "$challenger_email"?>">
<INPUT NAME=reason TYPE=hidden VALUE="<?php echo "$reason"?>">
<INPUT NAME=other_reason TYPE=hidden VALUE="<?php echo "$other_reason"?>">
<INPUT NAME=battle_state TYPE=hidden VALUE="<?php echo "$battle_state"?>">
<INPUT NAME=opted_in TYPE=hidden VALUE="<?php echo "$opted_in"?>">
<input type="submit" value = "Let the challenge go forth!"/>
</form>
</div>