Rifts Posted March 24, 2011 Share Posted March 24, 2011 hey guys I have a form with two image buttons to submit the form i'm trying to check which button was pressed but its recognizing it at all here is my code <form action="vote.php" method="post"> <input type="image" src="sucksbtn.png" name="sucksbtn" ><br /><br /><br /> <input type="image" src="lifebtn.png" name="lifebtn" ><br /> then in the vote.php im doing this if(isset($_POST['sucksbtn'])) { echo "<font color='white'>sucks</font>"; } nothing echos if i click the sucksbtn Link to comment https://forums.phpfreaks.com/topic/231634-if-isset-wont-work-for-images/ Share on other sites More sharing options...
void Posted March 24, 2011 Share Posted March 24, 2011 because there's no value attribute on the <input>? Link to comment https://forums.phpfreaks.com/topic/231634-if-isset-wont-work-for-images/#findComment-1191894 Share on other sites More sharing options...
kenrbnsn Posted March 24, 2011 Share Posted March 24, 2011 Are you testing this using MSIE? MSIE only returns the x & y position of where you clicked in the image as $_POST['sucksbtn_x'] and $_POST['sucksbtn_y'] Ken Link to comment https://forums.phpfreaks.com/topic/231634-if-isset-wont-work-for-images/#findComment-1191897 Share on other sites More sharing options...
Rifts Posted March 24, 2011 Author Share Posted March 24, 2011 no i dont even know what that is Link to comment https://forums.phpfreaks.com/topic/231634-if-isset-wont-work-for-images/#findComment-1191902 Share on other sites More sharing options...
Rifts Posted March 24, 2011 Author Share Posted March 24, 2011 because there's no value attribute on the <input>? your right that fixed it thanks Link to comment https://forums.phpfreaks.com/topic/231634-if-isset-wont-work-for-images/#findComment-1191904 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.