Hello all,
Im trying to display an image to the right side of radio buttons. I kind of did it, but my OK button is too low now, which means I must have put this echo code in the middle of the radio button list or something.
Im an absolute php newbie and Ive been tryig to resolve this for some time now, but I just dont see what Im doing wrong... Can anyone help, please? Im posting my code... Thanx in advance.
<?php
if(isset($_REQUEST["submit"]));{
$choice=$_REQUEST["choice"];
echo "Voce koje ste izabrali: $choice";
}
$img=array("ananas"=>array("ananas","pineapple.jpg"), "jagode"=>array("jagode","strawberries.jpg"), "visnje"=>array("visnje","bcherries.jpg"), "lubenica"=>array("lubenica","watermelon.jpg"), "mandarine"=>array("mandarine","mandarines.jpg"), "limun"=>array("limun","lemon.jpg"), "mango"=>array("mango","mango.jpg"));
?>
<div class="b" align="left" style="padding-left:15px;">
<form name="vocnaforma" method="POST" >
<b><i>Izaberite voce po zelji:</i></b>
<br>
<?php
foreach($img as $k=>$v){
echo "<input type='radio' name='choice' value='$k'";
if($k==$choice){
$imgsrc=$v[1];
echo 'checked="checked"';
}
echo "> $v[0] <br/>";
}
echo "<table align='center'><tr><td><img src=$imgsrc height='95'></td></tr></table>";
?>
<button name="submit" type="submit" > OK </n>
</form>
</div>