I believe you can also prevent the header error by using ob_start(); "Jean-Louis Letortorec" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > To work around that "headers already sent" problem, I use: > > if ($condition == true) { echo > "<script>location.href=('http://...');</script>"; } > > That works great all the time (unless the javascript has been disabled at > the browser side, but usually it's enabled). > > > Jean-Louis > > > > At 15:55 3-4-2003, you wrote: > >Hi, > > > >How would one redirect a user to a different page if a certain > >condition was met? > > > >i.e. > > > >if($condition == true){ > > goTo newPage.php > >} > > if ($condition == true) > { > Header("Location: > "http://www.sense.nl/index.php?module=ContentExpress&func=display&ceid=15"); > } > > take care that your script does not create any output before this,because > then you will get an error (headers already sent) > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php