otuatail Posted June 12, 2008 Share Posted June 12, 2008 if i have the following in my first page <input type="submit" name="submit" value="x"> <input type="submit" name="submit" value="y"> I can sy on the next page If($_POST['submit'] == x) but if I use <input type="image" name="LogOn" value="LogOn" src="images/Submit.gif" alt="Log On"> I can't do this as Value has no value in this case? Desmond. Link to comment https://forums.phpfreaks.com/topic/109967-solved-ltimagegt-has-no-value/ Share on other sites More sharing options...
PFMaBiSmAd Posted June 12, 2008 Share Posted June 12, 2008 Read this on how to use an image as a submit button - http://www.php.net/manual/en/faq.html.php#faq.html.form-image Link to comment https://forums.phpfreaks.com/topic/109967-solved-ltimagegt-has-no-value/#findComment-564281 Share on other sites More sharing options...
otuatail Posted June 14, 2008 Author Share Posted June 14, 2008 This does not address the issue. if I have 2 buttons on a form and the form is posted to page2.php how can I do an if statment on it <input type="image" name="button1" src="images/Update_beer.gif" alt="Update_beer"> <input type="image" name="button2" src="images/Update_lemmonade.gif" alt="Update_lemmonade"> Link to comment https://forums.phpfreaks.com/topic/109967-solved-ltimagegt-has-no-value/#findComment-565467 Share on other sites More sharing options...
AndyB Posted June 14, 2008 Share Posted June 14, 2008 If Update_beer has been clicked then $_POST['button1_x'] will have a value. If Update_lemmonade has been clicked then $_POST['button2_x'] will have a value. Link to comment https://forums.phpfreaks.com/topic/109967-solved-ltimagegt-has-no-value/#findComment-565489 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.