ltrem Posted July 6, 2009 Share Posted July 6, 2009 Good morning guys, I cannot really show you the code I use since it's kind of elaborate but my main question is this : Does anybody know why would some PHP code would work with Firefox (ALL THE TIME) and the same code doesn't work ALL THE TIME (sometimes it work) with Internet Explorer 7 ? I was thinking the only problems IE vs Firefox would be on the client side... with the HTML and CSS...?? What could be wrong? Link to comment https://forums.phpfreaks.com/topic/164937-solved-php-code-work-with-firefox-sometimes-dont-with-ie/ Share on other sites More sharing options...
shergold Posted July 6, 2009 Share Posted July 6, 2009 it defiantly isn't PHP as it only outputs unless its something your outputting with PHP such as CSS. I think your problem is most probably CSS as there are allot of things that IE doesn't accept and firefox does. Shergold. Link to comment https://forums.phpfreaks.com/topic/164937-solved-php-code-work-with-firefox-sometimes-dont-with-ie/#findComment-869735 Share on other sites More sharing options...
PFMaBiSmAd Posted July 6, 2009 Share Posted July 6, 2009 You would need to narrow down the problem. What exactly does not work? A form does not seem to submit? Some javascript does not run? The layout is different? Sessions don't work? Link to comment https://forums.phpfreaks.com/topic/164937-solved-php-code-work-with-firefox-sometimes-dont-with-ie/#findComment-869737 Share on other sites More sharing options...
ltrem Posted July 6, 2009 Author Share Posted July 6, 2009 I think it might be a sessions related problems. On my site, I have many "category" of different product. The user can subscribe to a product to receive email when new product is there. With Firefox, the user can navigate and subscribe to any category without problems, the INSERT/UPDATE are done correctly in the Database. However, with Internet Explorer, the user can only subscribe to ONE category. Each time he tries to subscribe to another, the code is executed as it worked (it return a message that he his subscribed) but the INSERT/UPDATE are NOT done in the Database. The user have to CLOSE the Window of IE, re-open it, go the the page again and subscribe, that will work. Over 1 subscribe doesn't work, IE have to be restarted for it to work again..... I don't understand. Weird.... work #1 with firefox and not with IE... that is not HTML/CSS related...... Link to comment https://forums.phpfreaks.com/topic/164937-solved-php-code-work-with-firefox-sometimes-dont-with-ie/#findComment-869748 Share on other sites More sharing options...
PFMaBiSmAd Posted July 6, 2009 Share Posted July 6, 2009 It sounds like the HTML of your form is invalid and the data is not being sent. Have you displayed all the form data once it reaches the server to know if you are getting the correct data from the browser? Link to comment https://forums.phpfreaks.com/topic/164937-solved-php-code-work-with-firefox-sometimes-dont-with-ie/#findComment-869752 Share on other sites More sharing options...
ltrem Posted July 6, 2009 Author Share Posted July 6, 2009 hmm nop... how could I do that if I may ask? Link to comment https://forums.phpfreaks.com/topic/164937-solved-php-code-work-with-firefox-sometimes-dont-with-ie/#findComment-869758 Share on other sites More sharing options...
PFMaBiSmAd Posted July 6, 2009 Share Posted July 6, 2009 echo "<pre>"; echo "GET:"; print_r($_GET); echo "POST:"; print_r($_POST); echo "</pre>"; Link to comment https://forums.phpfreaks.com/topic/164937-solved-php-code-work-with-firefox-sometimes-dont-with-ie/#findComment-869759 Share on other sites More sharing options...
ltrem Posted July 6, 2009 Author Share Posted July 6, 2009 echo "<pre>"; echo "GET:"; print_r($_GET); echo "POST:"; print_r($_POST); echo "</pre>"; Alright! Thanks, I figured out one of my variable from the Sessions Array isn't updating from page to page in IE... but it does in Firefox.. WTH ! I hate IE... Link to comment https://forums.phpfreaks.com/topic/164937-solved-php-code-work-with-firefox-sometimes-dont-with-ie/#findComment-869778 Share on other sites More sharing options...
PFMaBiSmAd Posted July 6, 2009 Share Posted July 6, 2009 If only one session variable is not working in IE, but other session variables do work in IE, that means either that session variable is not being set or it is being overwritten. About the only two things that could cause that are if an image is being used as a submit button and/or register_globals are on and you have some other variable with the same name that IS being providing when IE requests a page but is not being sent by FF when it requests a page. Link to comment https://forums.phpfreaks.com/topic/164937-solved-php-code-work-with-firefox-sometimes-dont-with-ie/#findComment-869873 Share on other sites More sharing options...
ltrem Posted July 7, 2009 Author Share Posted July 7, 2009 I found the error... well a Co-Worker found it but here it is : The thing I forgot to mention is that the INSERT query is executed via a php script that is called by a AJAX function. With Internet Explorer, the first click CACHE the sessions and each time the script URL is called with the AJAX, it take the cached array. I solved that problems by adding a parameter "random". I randomise a number so that each other click have a different "random" than the last one! This way it doesn't take the cache since the URL is different. I still thank you ALOT for your help! Link to comment https://forums.phpfreaks.com/topic/164937-solved-php-code-work-with-firefox-sometimes-dont-with-ie/#findComment-870379 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.