*** iceking wrote/escribió (Thu, 16 Sep 2004 10:07:37 +0200):There's no point in displaying info for the user at the same time you're> I have a php script that checks whether the user is allowed to perform an
> action. If he is not allowed; I display a warning; using the alert function.
> After clicking away this function, I want to redirect the user to the
> original page using the header function.
> However, I get the normal message " headers already sent"... I know what
> the problem is.
> But how do you normally deal with this situation? use a html/php for the
> warning instead of alert message? or is there another way?
redirecting the user out of the page where that info is.
Unless you have very specific needs I can't see a reason to avoid Really
<p>Action not allowed</p>
<p><a href="<?=htmlspecialchars($previous_page)?>">Retur n</a></p>
(Is is necessary to crosspost?)
-- Álvaro G. Vicario - Burgos, Spain
-- Thank you for not e-mailing me your questions