spiceydog Posted July 15, 2008 Share Posted July 15, 2008 Ok so I have probably the most annoying problem on my hands I have ever run into in my PHP scripting!! I am making a website and the login submit button is a simple <input type="image" etc.> that submits the login form and logs you in! It works in EVERY browser except Opera!!! Well atleast I've tried Safari, Firefox, and Internet Explorer and it worked in all of them just fine... Anyway, the exact code of my input button is: <input type="image" value="Login" name="submit" src="images/login.jpg"> Then at the top of the page is the whole login which includes the "if (isset($_POST['submit']))" and all that good stuff that sets the cookies and logs you in.... So it works in ALL browsers except Opera! WHY?!?! I would post the URL for the website here but since it's not done I really can't.... The problem I am getting in Opera: The page basically just refreshes. Nothing is submitted and no cookies are set. The only reason the page refreshes is because the form action tells it to. Link to comment https://forums.phpfreaks.com/topic/114814-solved-input-typequotimagequot-doesnt-work-in-opera-to-submit-data-to-php/ Share on other sites More sharing options...
DeanWhitehouse Posted July 15, 2008 Share Posted July 15, 2008 what isnt working, it isn't posting, or there's an error? Link to comment https://forums.phpfreaks.com/topic/114814-solved-input-typequotimagequot-doesnt-work-in-opera-to-submit-data-to-php/#findComment-590359 Share on other sites More sharing options...
spiceydog Posted July 15, 2008 Author Share Posted July 15, 2008 Oh sorry! guess i forgot to mention that.. It's basically just refreshing the page... Nothing seems to be submitted and no cookies are set. The only reason the page refreshes is because the form action tells it to. Link to comment https://forums.phpfreaks.com/topic/114814-solved-input-typequotimagequot-doesnt-work-in-opera-to-submit-data-to-php/#findComment-590360 Share on other sites More sharing options...
DeanWhitehouse Posted July 15, 2008 Share Posted July 15, 2008 can u post all of ure code Link to comment https://forums.phpfreaks.com/topic/114814-solved-input-typequotimagequot-doesnt-work-in-opera-to-submit-data-to-php/#findComment-590364 Share on other sites More sharing options...
DoddsAntS Posted July 15, 2008 Share Posted July 15, 2008 Opera sends the x/y coords of the image that you clicked so you'll need to either add a check for $_POST['submit_x'] and or $_POST['submit_y'] Link to comment https://forums.phpfreaks.com/topic/114814-solved-input-typequotimagequot-doesnt-work-in-opera-to-submit-data-to-php/#findComment-590377 Share on other sites More sharing options...
spiceydog Posted July 15, 2008 Author Share Posted July 15, 2008 I actually was looking into x and y coords causing the problem earlier... i found a simple script but it didnt work and i gave up on that idea... do you know how i would do it? Link to comment https://forums.phpfreaks.com/topic/114814-solved-input-typequotimagequot-doesnt-work-in-opera-to-submit-data-to-php/#findComment-590391 Share on other sites More sharing options...
DoddsAntS Posted July 15, 2008 Share Posted July 15, 2008 hi, try if(isset($_POST['submit']) || (isset($_POST['submit_x']) && isset($_POST['submit_y']))) { //your code } Link to comment https://forums.phpfreaks.com/topic/114814-solved-input-typequotimagequot-doesnt-work-in-opera-to-submit-data-to-php/#findComment-590453 Share on other sites More sharing options...
spiceydog Posted July 15, 2008 Author Share Posted July 15, 2008 OMG YES IT WORKS!! thank you so much!!!! There was however a slight error with your code. You were missing 2 ('s Heres the fixed version for anyone who copies and pastes that: if(isset($_POST['submit']) || (isset($_POST['submit_x']) && (isset($_POST['submit_y'])))) { //your code } Link to comment https://forums.phpfreaks.com/topic/114814-solved-input-typequotimagequot-doesnt-work-in-opera-to-submit-data-to-php/#findComment-590834 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.