Page 2 of 2

Re: Firefox vs Safari

Posted: Mon Mar 23, 2009 6:06 pm
by php_east
sleepydad wrote:The data entered into the interface when using Safari is not being posted to mySQL.
maybe safari is not forgiving about this html error in index...

Code: Select all

echo "<input type='hidden' name='action' value='update'><input type='hidden' name='useIndex' value='".$index."></form>";
 
whereas other browsers are a little bit relaxed on such errors.

Re: Firefox vs Safari

Posted: Mon Mar 23, 2009 6:14 pm
by Benjamin

Code: Select all

 
if ($dupe) {
header("location: update.php?index={$useIndex}");
}
 
I haven't yet taken a close look at your code, but the first thing I noticed is that you have a header redirect with a relative url. Header redirects need to have absolute URL's. See if that fixes it and then we can go from there.

Re: Firefox vs Safari

Posted: Mon Mar 23, 2009 7:19 pm
by JAB Creations
You would have had this issue resolved ten seconds after it occurred if you were using XHTML served as application/xhtml+xml and read the error message in Firefox. While using application/xhtml+xml will catch all errors it will catch all critical errors such as this and yes that is a very critical error. Once the browser encounters an error your markup then forget standards mode; the browser has to decide how to handle it. If Gecko ignores this and WebKit has a big fit then I side with WebKit: computers do what you tell them to do, not what you want them to do. That is why so many people think IE renders things correctly and that all other browsers render them incorrectly; it's crappy at standards but awesome if you're a total amateur (and using a WYSIWYG editor). So convert your pages to XHTML 1.0 Strict and if the browser supports application/xhtml+xml (which is part of the client headers sent before PHP does anything itself) serve the page as application/xhtml+xml...at least while you are in a test environment. I do it in all my environments so if any problem occurs I'm going to see it immediately.

Re: Firefox vs Safari

Posted: Mon Mar 23, 2009 7:20 pm
by Inkyskin
Safari also doesnt always like header redirects with no exit() after them - not sure why, its just odd like that