Hello Stuart,

Monday, November 8, 2004, 10:31:51 AM, you wrote:

SF> Say I have a script that processes input data. How do I get the
SF> script to work, where after processing the user is taken to
SF> another page ? The script outputs nothing to the screen and will
SF> end either in failure or success.

SF> Seems header won't work for me.

A redirect (Location) header is the only way to send the user to
another page from within a PHP script (that or output a meta refresh
tag, which is a bit messy).

Header will work, providing you haven't already output anything - use
the headers_sent() function to test if you've output the headers
already and do something based on that, i.e:

if (headers_sent())
{
   echo 'I have ballsed up somewhere and output some text or
   white-space, aborting';
}
else
{
    header('Location: http://www.blah.com/page2.html');
}

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I am not young enough to know everything." - Oscar Wilde

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

Reply via email to