RE: Redirect then error message to user

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This isn't working: 
Page2 (after page1 has been posted):

   else
   {
  $_SESSION['er'] = 'Please make sure to fill in all 3
corresponding values .........';
    header("Location:
http://www.xxxxx.com/TestMulti4a.php"; );
    exit;
   }
  
  }

Page1:
Opening after session_start

$_SESSION['er'] = $_POST['er'];

Then below in form area:

print $er; (tried also echo)

Am I do something wrong ?

Stuart

--- Jay Blanchard
<jay.blanchard@xxxxxxxxxxxxxxxxxxxxx> wrote:

> [snip]
>    {
>     header("Location:
> http://www.xxxxxx.com/page1.php";
> );
>     print "You have errors";
>     exit;
>    }
>   
>   }
> [/snip]
> 
> You either need to carry info about the error in a
> session variable or
> url string or something...above your redirect
> happens before any error
> can be sent to the browser....
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux