I tried to create image button but did not work.
Does anyone know how to create image button?
<?php
$img_value="OFF ";
$bttn_image="../qoim/playoff.bmp";
echo "<br> After process, Image value is " .$img_value. "<br>";
if($_POST['img_button']=='ON'){
$img_status= " On image is running!!!";
$img_value="OFF ";
$bttn_image="../qoim/playoff.bmp";
}
if($_POST['img_button']=='OFF'){
$img_status= "OFF image is running!!!";
$img_value="ON" ;
$bttn_image="../qoim/playon.bmp";
}
?>
<form name = "imgForm" action = "test.php" method = "POST">
<table cellspacing=4 cellpadding=4>
<tr align="center" bgcolor="#DDF5C 3">
<td width =400><h3> Status </h3></td>
<td><h3> ON/OFF </h3></td>
</tr><tr bgcolor="#DDF5C 3">
<td><?=$img_sta tus ?></td>
<td><input type="IMAGE" src="<?=$bttn_i mage ?>" name="img_butto n" value="<?=$img_ value ?>" style="height:5 0; width:50;"></td>
</tr>
</table>
</form>
<?php
echo "<br> After process, Image value is " .$img_value. "<br>";
?>
Please, help me out.
Does anyone know how to create image button?
<?php
$img_value="OFF ";
$bttn_image="../qoim/playoff.bmp";
echo "<br> After process, Image value is " .$img_value. "<br>";
if($_POST['img_button']=='ON'){
$img_status= " On image is running!!!";
$img_value="OFF ";
$bttn_image="../qoim/playoff.bmp";
}
if($_POST['img_button']=='OFF'){
$img_status= "OFF image is running!!!";
$img_value="ON" ;
$bttn_image="../qoim/playon.bmp";
}
?>
<form name = "imgForm" action = "test.php" method = "POST">
<table cellspacing=4 cellpadding=4>
<tr align="center" bgcolor="#DDF5C 3">
<td width =400><h3> Status </h3></td>
<td><h3> ON/OFF </h3></td>
</tr><tr bgcolor="#DDF5C 3">
<td><?=$img_sta tus ?></td>
<td><input type="IMAGE" src="<?=$bttn_i mage ?>" name="img_butto n" value="<?=$img_ value ?>" style="height:5 0; width:50;"></td>
</tr>
</table>
</form>
<?php
echo "<br> After process, Image value is " .$img_value. "<br>";
?>
Please, help me out.
Comment