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!
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.
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.