|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Image submit button ??
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 |
|
#2
|
||||
|
||||
|
Where are you assigning the values to $imgbut, $butsubmit, and $inputtext ? You need to set the name of the button to something, and do
Code:
if(isset($_POST['imgbut])){
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Image submit button ?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|