Firefox vs Safari

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
php_east
Forum Contributor
Posts: 453
Joined: Sun Feb 22, 2009 1:31 pm
Location: Far Far East.

Re: Firefox vs Safari

Post 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.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Firefox vs Safari

Post 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.
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: Firefox vs Safari

Post 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.
User avatar
Inkyskin
Forum Contributor
Posts: 282
Joined: Mon Nov 19, 2007 10:15 am
Location: UK

Re: Firefox vs Safari

Post by Inkyskin »

Safari also doesnt always like header redirects with no exit() after them - not sure why, its just odd like that
Post Reply