Re: [PHP] header("Location:...") fails

2010-01-14 Thread haliphax
On Wed, Jan 13, 2010 at 7:02 PM, Shawn McKenzie wrote: > Robert Cummings wrote: > > Just make your life easy and create a redirect() function that generates > > the header instruction, makes a relative URL into an absolute URL and > > does the exit call. Then you just need to do: > > > > redirect(

Re: [PHP] header("Location:...") fails

2010-01-13 Thread Shawn McKenzie
Robert Cummings wrote: > Just make your life easy and create a redirect() function that generates > the header instruction, makes a relative URL into an absolute URL and > does the exit call. Then you just need to do: > > redirect( 'target.php' ); > > So much simpler :) > > Cheers, > Rob

Re: [PHP] header("Location:...") fails

2010-01-13 Thread Robert Cummings
Paul M Foster wrote: On Wed, Jan 13, 2010 at 11:39:18AM -0800, Richard S. Crawford wrote: Here is a snippet of code that is going to be the death of me: // Create a new project $projectcode = strtoupper(addslashes($_POST['projectcod

Re: [PHP] header("Location:...") fails

2010-01-13 Thread Paul M Foster
On Wed, Jan 13, 2010 at 11:39:18AM -0800, Richard S. Crawford wrote: > Here is a snippet of code that is going to be the death of me: > > > // Create a new project > $projectcode = strtoupper(addslashes($_POST['projectcode'])); // p

Re: [PHP] header("Location:...") fails

2010-01-13 Thread Andrew Ballard
On Wed, Jan 13, 2010 at 2:39 PM, Richard S. Crawford wrote: > Now, even if $numprojects is 1, 2, 3, etc., the header() command is not > executed. Strangely, a header("Location") command later on in the script > *is* executed. I've output the value of $numprojects, so I know that it's > greater tha

Re: [PHP] header("Location:...") fails

2010-01-13 Thread Bruno Fajardo
2010/1/13 Richard S. Crawford > > Here is a snippet of code that is going to be the death of me: > > > //  Create a new project > $projectcode = strtoupper(addslashes($_POST['projectcode']));   //  project > code > > //  Make sure the pr

[PHP] header("Location:...") fails

2010-01-13 Thread Richard S. Crawford
Here is a snippet of code that is going to be the death of me: // Create a new project $projectcode = strtoupper(addslashes($_POST['projectcode'])); // project code // Make sure the project code is unique if (!$existingproject = my