Re: if cant use header what should i use? or how to do this?
| From: | Jason Soza | Date: | Fri, 03 May 2002 23:07:23 +0000 |
| Subject: | Re: if cant use header what should i use? or how to do this? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-95990@lists.php.net to get a copy of this message | ||
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 <Mantuks@attbi.com>
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:
> Mantuks@attbi.com
> Http://mntkz-hata.visiems.lt