loozah Posted June 26, 2010 Share Posted June 26, 2010 Well there goes the rest of my hair... can someone please shed some light on this, the following code works fine in Firefox, Safari and Chrome but not in MSIE, Opera or Maxthon. $rand_key = generateRandomKey(30); $name = $_POST['name']; $email = $_POST['email']; $country = $_POST['country']; $terms = $_POST['terms']; $ip = $_SERVER['REMOTE_ADDR']; mysql_query("INSERT INTO cath5388_users (fullname, password, email, country, rand_key, terms, ip_addr) VALUES ('$name', '$password', '$email', '$country', '$rand_key', '$terms', '$ip')") or die(mysql_error()); I've googled every query I can think of but found nothing. Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/205931-insert-into-dosnt-work-with-ie-opera-or-maxthon/ Share on other sites More sharing options...
bluejay002 Posted June 26, 2010 Share Posted June 26, 2010 First of... INSERT INTO, which is a query, is not the reason if it does not run on other browsers, SQL has no idea what browser you use and never will (I suppose). Better check first if all those values are being passed properly to your server from the client during that POST. Something must have gone wrong beforehand. bluejay, Quote Link to comment https://forums.phpfreaks.com/topic/205931-insert-into-dosnt-work-with-ie-opera-or-maxthon/#findComment-1077601 Share on other sites More sharing options...
PFMaBiSmAd Posted June 26, 2010 Share Posted June 26, 2010 The HTML of your form is probably invalid and the browsers where it happens to work, are probably ignoring the markup errors. Quote Link to comment https://forums.phpfreaks.com/topic/205931-insert-into-dosnt-work-with-ie-opera-or-maxthon/#findComment-1077606 Share on other sites More sharing options...
loozah Posted June 26, 2010 Author Share Posted June 26, 2010 Thanks for the input guys, yes it would appear to be an issue with the form html, I tried echoing out form by setting the action to a separate page and it worked so I tried creating a new form and it worked so after being up all night with this one I think I'll go grab some rest, Thanks again I'll let you know if I get it working. Quote Link to comment https://forums.phpfreaks.com/topic/205931-insert-into-dosnt-work-with-ie-opera-or-maxthon/#findComment-1077638 Share on other sites More sharing options...
kenrbnsn Posted June 26, 2010 Share Posted June 26, 2010 Show us the code for your form and we may be able to help you. Ken Quote Link to comment https://forums.phpfreaks.com/topic/205931-insert-into-dosnt-work-with-ie-opera-or-maxthon/#findComment-1077640 Share on other sites More sharing options...
loozah Posted June 26, 2010 Author Share Posted June 26, 2010 :PDoh! now I feel stooopid! I had a similar problem once before... I simply forgot not to use images instead of buttons in forms, just changed them back and everything is working find sorry for the trouble but thanks for the help I would have been going at it for another night if not for you guys explaining that the problem wasn't in the query but in the html. Cheers! Quote Link to comment https://forums.phpfreaks.com/topic/205931-insert-into-dosnt-work-with-ie-opera-or-maxthon/#findComment-1077652 Share on other sites More sharing options...
PFMaBiSmAd Posted June 26, 2010 Share Posted June 26, 2010 You can use images as submit buttons in forms so that they will work in all browsers, you must simply use the _x or _y variables that the HTML specification states are to be submitted - http://us3.php.net/manual/en/faq.html.php#faq.html.form-image Quote Link to comment https://forums.phpfreaks.com/topic/205931-insert-into-dosnt-work-with-ie-opera-or-maxthon/#findComment-1077655 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.