Hi,
I changed the submit button created using <INPUT TYPE="SUBMIT> to an image submit button <INPUT TYPE="IMAGE" SRC="login1.gif">. here is my code:
<?
if(isset($imgbut)){
echo "You click image button: $inputtext <br>"; //***
}
elseif (isset($butsubmit)){
echo "You click submit button: $inputtext <br>"; //+++
}
else{
echo "No click :$inputtext<br>"; //@@@
}
?>
<html>
<head>
<title></title>
</head>
<body bgcolor="#FFFFFF">
Submit Button Image<br>
<form action="imagebutton.php" method="post">
<input type="text" name="inputtext">
<input type="submit" name= "butsubmit" value="click me">
<input type="image" name="imgbut" src="login1.gif" value="Submitimage" >
</form>
</body>
</html>
When I click the image button( name= imgbut), it did not execute line //*** instead execute line/@@@, Why? How can I execute line/***? There is no problem if I click submit button(name=butsubmit). How can I get $imgbut variable after form action in php?
Many thanks for help
Richard
I changed the submit button created using <INPUT TYPE="SUBMIT> to an image submit button <INPUT TYPE="IMAGE" SRC="login1.gif">. here is my code:
<?
if(isset($imgbut)){
echo "You click image button: $inputtext <br>"; //***
}
elseif (isset($butsubmit)){
echo "You click submit button: $inputtext <br>"; //+++
}
else{
echo "No click :$inputtext<br>"; //@@@
}
?>
<html>
<head>
<title></title>
</head>
<body bgcolor="#FFFFFF">
Submit Button Image<br>
<form action="imagebutton.php" method="post">
<input type="text" name="inputtext">
<input type="submit" name= "butsubmit" value="click me">
<input type="image" name="imgbut" src="login1.gif" value="Submitimage" >
</form>
</body>
</html>
When I click the image button( name= imgbut), it did not execute line //*** instead execute line/@@@, Why? How can I execute line/***? There is no problem if I click submit button(name=butsubmit). How can I get $imgbut variable after form action in php?
Many thanks for help
Richard