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

2010-01-14 Thread haliphax
On Wed, Jan 13, 2010 at 7:02 PM, Shawn McKenzie nos...@mckenzies.netwrote: 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:

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

2010-01-13 Thread Bruno Fajardo
2010/1/13 Richard S. Crawford rscrawf...@mossroot.com 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 //  

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

2010-01-13 Thread Andrew Ballard
On Wed, Jan 13, 2010 at 2:39 PM, Richard S. Crawford rscrawf...@mossroot.com 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

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'])); //

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 =

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.