otuatail Posted January 25, 2010 Share Posted January 25, 2010 How do I detect which image button has been clicked in http://www.des-otoole.co.uk/cms/admin/pages.php Please this is doing my head in. Link to comment https://forums.phpfreaks.com/topic/189753--/ Share on other sites More sharing options...
otuatail Posted January 25, 2010 Author Share Posted January 25, 2010 Works in opera but not in IE8 ??? Link to comment https://forums.phpfreaks.com/topic/189753--/#findComment-1001387 Share on other sites More sharing options...
PFMaBiSmAd Posted January 25, 2010 Share Posted January 25, 2010 http://www.php.net/manual/en/faq.html.php#faq.html.form-image Link to comment https://forums.phpfreaks.com/topic/189753--/#findComment-1001394 Share on other sites More sharing options...
otuatail Posted January 25, 2010 Author Share Posted January 25, 2010 yes but this dosn't help. It works in opera but not in IE8 Link to comment https://forums.phpfreaks.com/topic/189753--/#findComment-1001400 Share on other sites More sharing options...
PFMaBiSmAd Posted January 25, 2010 Share Posted January 25, 2010 In addition to needing to access the image as submit buttons as $_POST['NewContent_x'] and $_POST['EditContent_x'], your page has 10 HTML validation errors, some of which might render it invalid in some browsers - http://validator.w3.org/check?uri=http%3A%2F%2Fwww.des-otoole.co.uk%2Fcms%2Fadmin%2Fpages.php&charset=%28detect+automatically%29&doctype=Inline&group=0 Link to comment https://forums.phpfreaks.com/topic/189753--/#findComment-1001466 Share on other sites More sharing options...
otuatail Posted January 25, 2010 Author Share Posted January 25, 2010 THis is getting silly. I can't find an error in this. I even deleteted all the code between <form> and </form> and it told me that there was an error with </form> Link to comment https://forums.phpfreaks.com/topic/189753--/#findComment-1001577 Share on other sites More sharing options...
otuatail Posted January 25, 2010 Author Share Posted January 25, 2010 Ok I thout you could have a form within a div <div> <form> </form> </div> I have corrected this error. I still cant get the submit buttons to echo in the next page in IE8. This works in FF and opera Link to comment https://forums.phpfreaks.com/topic/189753--/#findComment-1001584 Share on other sites More sharing options...
haku Posted January 26, 2010 Share Posted January 26, 2010 if(isset($_POST['NewContent_x'])) Button NewContent was clicked. if(isset($_POST['EditContent_x'])) Button EditContent was clicked. Link to comment https://forums.phpfreaks.com/topic/189753--/#findComment-1001605 Share on other sites More sharing options...
otuatail Posted January 26, 2010 Author Share Posted January 26, 2010 No this definatly does not work. I have changed the code to isset() Works fine in Firefox, works fine in Opera. Does not work in IE*. This must be an IE8 problem Link to comment https://forums.phpfreaks.com/topic/189753--/#findComment-1001825 Share on other sites More sharing options...
PFMaBiSmAd Posted January 26, 2010 Share Posted January 26, 2010 Without seeing your code, no one can possibly tell you why it is not working. The information about using the _x variable name works in all browsers. Link to comment https://forums.phpfreaks.com/topic/189753--/#findComment-1001852 Share on other sites More sharing options...
otuatail Posted January 26, 2010 Author Share Posted January 26, 2010 Ok I have found a fix in the second page if(isset($_POST[NewContent_x])) $Button = "1"; if(isset($_POST[EditContent_x])) $Button = "2"; if($Button == 1) header('Location: NewContent.php'); if($Button == 2) header('Location: EditContent.php'); Desmond. Link to comment https://forums.phpfreaks.com/topic/189753--/#findComment-1001869 Share on other sites More sharing options...
bombsquad Posted January 28, 2010 Share Posted January 28, 2010 if(isset($_POST['NewContent_x'])) Button NewContent was clicked. if(isset($_POST['EditContent_x'])) Button EditContent was clicked. this is the right and working code.. you made a hard coded way otuatail but the function is the same as haku. Link to comment https://forums.phpfreaks.com/topic/189753--/#findComment-1002914 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.