Can't quite get the code in the right order
Posted: Tue Sep 14, 2010 2:14 pm
Hello All,
Usual scenario - php noob trying to get something simple right without actually managing it
I've got the following code:
And it's giving me the result:
111
You chose: (here's the tick box)
The text should look like: You chose: 111 (here's the tick box)
Any idea what I'm getting wrong? Many thanks in advance
Usual scenario - php noob trying to get something simple right without actually managing it
I've got the following code:
Code: Select all
$string9 = ($_POST['level']);
$alevel = $string9;
$N=count($alevel);
for($i = 0; $i < $N; $i++)
if ($level == "AAA"){
print ("111");
} elseif ($level == "BBB"){
print ("222");
}
else {
print ("333");
}
{
echo("<h2>You chose: <font color=#04B404>" .$alevel[$i] . "</font> <input type=checkbox name=level[] checked=yes value=" .$alevel[$i] . "></h2>\n");
}
}
111
You chose: (here's the tick box)
The text should look like: You chose: 111 (here's the tick box)
Any idea what I'm getting wrong? Many thanks in advance