Chames
12-28-2005, 07:40 PM
Hello,
I am new to PHP coding, and I need help with a code.
<?
if ($HTTP_POST_VARS['check']) {
$box=$HTTP_POST_VARS['box1']; //as a normal var
$box_count=count($box); // count how many values in array
foreach ($box as $dear) {
echo $dear."<br>";
}
echo "<hr>";
}
?>
<form name="hede" method="POST" action="">
<input type="checkbox" name="box1[]" value="
<Effect name="ARMY Change Name"<
<Param name="SrcArmy" dispName="$$22348$$Army" VarType="group"<default</Param<
<Param name="NewName" dispName="$$23784$$Name" varType="stringid"<Name</Param<
<Command<trArmySelect("%SrcArmy%");</Command<
<Command<trUnitChangeName("%NewName%");</Command<
</Effect<
"> Army change name <br>
<input type="checkbox" name="box1[]" value="
<Effect name="ARMY Damage"<
<Param name="SrcArmy" dispName="$$22348$$Army" VarType="group"<default</Param<
<Param name="DamageAmt" dispName="$$23762$$DamagePct" varType="float"<1</Param<
<Command<trArmySelect("%SrcArmy%");</Command<
<Command<trDamageUnit(%DamageAmt%);</Command<
</Effect<
">Army damage<br>
<input type="submit" name="check" value="SEND">
</form>
In the "value" area, I changed the "<" to "< I assumed that this would work, but it isn't. Also, there are many more options in the final, but to save space I didn't put them all here. Here is what I want to happen, the user selects the boxs, and when he presses submit, the code will appear on top, but I just can't get it to work!Some help would be greatly appreciated, whats wrong with it?
I am new to PHP coding, and I need help with a code.
<?
if ($HTTP_POST_VARS['check']) {
$box=$HTTP_POST_VARS['box1']; //as a normal var
$box_count=count($box); // count how many values in array
foreach ($box as $dear) {
echo $dear."<br>";
}
echo "<hr>";
}
?>
<form name="hede" method="POST" action="">
<input type="checkbox" name="box1[]" value="
<Effect name="ARMY Change Name"<
<Param name="SrcArmy" dispName="$$22348$$Army" VarType="group"<default</Param<
<Param name="NewName" dispName="$$23784$$Name" varType="stringid"<Name</Param<
<Command<trArmySelect("%SrcArmy%");</Command<
<Command<trUnitChangeName("%NewName%");</Command<
</Effect<
"> Army change name <br>
<input type="checkbox" name="box1[]" value="
<Effect name="ARMY Damage"<
<Param name="SrcArmy" dispName="$$22348$$Army" VarType="group"<default</Param<
<Param name="DamageAmt" dispName="$$23762$$DamagePct" varType="float"<1</Param<
<Command<trArmySelect("%SrcArmy%");</Command<
<Command<trDamageUnit(%DamageAmt%);</Command<
</Effect<
">Army damage<br>
<input type="submit" name="check" value="SEND">
</form>
In the "value" area, I changed the "<" to "< I assumed that this would work, but it isn't. Also, there are many more options in the final, but to save space I didn't put them all here. Here is what I want to happen, the user selects the boxs, and when he presses submit, the code will appear on top, but I just can't get it to work!Some help would be greatly appreciated, whats wrong with it?