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. Quote Link to comment 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 Quote Link to comment 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"> Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.