Re: MS-SQL 7 versus MS-SQL 2000

From: Date: Wed, 08 May 2002 16:18:28 +0000
Subject: Re: MS-SQL 7 versus MS-SQL 2000
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-96598@lists.php.net to get a copy of this message
Hi there, For those interested, I finally did find the answer to my problem. And of course - as always - it turned out the be a coding error anyway. Really embarrassing, but to safe others from making the same mistake, I thought I'd mention it here anyway: On Wed, 08 May 2002 11:59:43 +0200, Vincent Oostindie wrote: > I've done some searching, and I've made the following observations: > - The "header('Location :' ...')" works fine. > - The URL for the new page is based on the one from the current page. > In my implementation that means that whether to execute an insertion, > deletion or update depends on the POST-parameters passed to the > script. > - Apparantly, the POST-variables for the current page are saved and > passed on to the next page when I execute the header-function, so, in > effect, the script opens itself again. As it turns out, my very first observation was wrong: the header()-function didn't work fine! The reason for this function failing was that it should always be passed an ABSOLUTE URL (HTTP 1.1 specification) , and I was passing it a RELATIVE one. Apache doesn't care much apparently, but IIS surely does. If you don't use POST-variables or don't redirect to the same page, you won't notice and everything works fine, but if you do have POST-variables and then redirect to a RELATIVE URL, those variables are maintained. That was what was causing my bug. So now you all know, and hopefully I've saved someone else from making the same mistake. Greetings, Vincent

« previous php.general (#96598) next »