I think it's because you need an absolute URL in there as opposed to 
the relative one you're using, i.e. "Location: 
http://www.example.com/menu?pg=news";

Try that, and try looking here:
http://www.php.net/manual/en/function.header.php

HTH,

Jason Soza

----- Original Message -----
From: Mantas Kriauciunas <[EMAIL PROTECTED]>
Date: Friday, May 3, 2002 4:59 pm
Subject: [PHP] if cant use header what should i use? or how to do this?

> Hey PHP General List,
> 
>  I have code like this(code starts at 100 line and has lots of
>  outputs):
>    if($news==del) {
>        if(!$nr) {
>           show_news_menu();
>           show_news_del();
>        } 
>        else if($nr) { 
>          if($do_del) {
>                $online = 
> @mysql_connect($db_address,$db_user,$db_pass) or die("MySQL Not 
> Connected");            mysql_select_db($db_name,$online) or 
> die("NO DATABASE FOUND");
>                if (!$result = @mysql_query("DELETE FROM news 
> WHERE id = \"$nr\"") ) {
>                      echo "Query Error";
>                    }
>                    die;
>               }
>               else if($do_cancel) {
>                       Header("Location: menu?pg=news"); <<---- wrong
>                   } else {
>                     show_news_menu();
>                     show_news_del();
>                     << ECHO SOME HTML STUFF(comments) >>
>                   }
>        }
> 
>     }
> 
> i have problem with Header, how should i change it? any suggestions?
> is there any other function to redirect? or should i make some
> fucntion my self..or what shoud i do ?
> thanks
> 
> :------------------------------:
>        Have A Nice Day! 
> Mantas Kriauciunas A.k.A mNTKz
> 
> Contacts:
> [EMAIL PROTECTED]
> Http://mntkz-hata.visiems.lt


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

Reply via email to