session variables - php header redirects not working -



session variables - php header redirects not working -

so, consolidated various php login files here one file. consolidate 1 file, append url, , different things based off of appended.

this works locally not on remote server.

anyway...

at top of 'consolidated' file have

session_start();

this time have session_start(). rest of post.php code looks this:

if(isset($_get['app1'])){ ...do stuff header("location:post.php?app2"); exit(); } if(isset($_get['app2'])){ ...do other stuff header("location:post.php?app3"); exit(); }

locally, if start @ post.php?app1, go post.php?app2 , work fine, on remote server gets stuck (no redirect). know why?

maybe these happen because there code provide output before trying redirect. seek add together buffer function in 'consolidated'file.

ob_start(); session_start();

php session-variables isset

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -