Jump to content

[SOLVED] Input type="image" Doesn't Work in Opera to Submit Data to PHP?


spiceydog

Recommended Posts

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.

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
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.