Help: image button

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • skim
    New Member
    • Sep 2006
    • 9

    #1

    Help: image button

    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.
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Is it just the button that doesn't show, because the button code looks fine to me

    Ronald :cool:

    Comment

    • thebone
      New Member
      • Oct 2006
      • 1

      #3
      ie problem with php and image buttons. check it out:

      solution

      Comment

      Working...