RE: [PHP] Re: changing to a different file in browser

From: Date: Fri, 06 Jul 2001 06:13:09 +0000
Subject: RE: [PHP] Re: changing to a different file in browser
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-56434@lists.php.net to get a copy of this message
even a blank line at the end of a file that you're include()ing will break header. you could use output buffering, but i dont think you really want to go to all that trouble for a simple redirect :) > -----Original Message----- > From: Chris Anderson [mailto:chrisderson@ameritech.net] > Sent: Thursday, July 05, 2001 19:47 > To: Brad Wright; PHP General List > Subject: Re: [PHP] Re: changing to a different file in browser > > > If you use Header after ANY page output, even a space, it will not work > ----- Original Message ----- > From: "Brad Wright" <bradwright@optushome.com.au> > To: "PHP General List" <php-general@lists.php.net> > Sent: Thursday, July 05, 2001 10:25 PM > Subject: Re: [PHP] Re: changing to a different file in browser > > > tried it, but it didn't work... still getting the same message in IE. Am I > missing something? Can I actually use the headr() function to redirect to a > different page while using sesions and session variables?? > > > From: "..s.c.o.t.t.." <scott@furt.com> > > Date: Thu, 5 Jul 2001 22:32:22 -0700 > > To: "Php-General" <php-general@lists.php.net> > > Subject: RE: [PHP] Re: changing to a different file in browser > > > > put "Location" before the URL: > > > > header("Location: http://server.com/file.php"); > > or > > header("Location: ./file.php"); > > > > > >> -----Original Message----- > >> From: Brad Wright [mailto:bradwright@optushome.com.au] > >> Sent: Thursday, July 05, 2001 18:54 > >> To: PHP General List > >> Subject: Re: [PHP] Re: changing to a different file in browser > >> > >> > >> ihave tried the header() function as Julio suggested. But I get an error > >> message in the browser. I am also using session variables in all these > pages > >> (only 2). > >> > >> My code : > >> if (!mysql_numrows($result) ) { > >> die ( "username/password not valid"); > >> } > >> else{ > >> > >> > >> header("Menu.php"); > >> } > >> > >> > >> > >> > >> > >> the error message in IE: > >> Warning: Cannot add header information - headers already sent by (output > >> started at /home/e-smith/files/ibays/bigpool1/html/login.php:1) in > >> /home/e-smith/files/ibays/bigpool1/html/login.php on line 1 > >> > >> > >> Thanks in advance, > >> brad > >> > >> > >>> From: "Inércia Sensorial" <inerte@hotmail.com> > >>> Date: Thu, 5 Jul 2001 22:26:24 -0300 > >>> To: php-general@lists.php.net > >>> Subject: [PHP] Re: changing to a different file in browser > >>> > >>> header ("http://www.example.com"); // > >>> Goes to example.com. > >>> > >>> -- > >>> > >>> > >>> Julio Nobrega. > >>> > >>> A hora está chegando: > >>> http://sourceforge.net/projects/toca > >>> > >>> "Brad Wright" <bradwright@optushome.com.au> wrote in message > >>> news:B76B4E96.384%bradwright@optushome.com.au... > >>>> Hi all, > >>>> I know this is probably the most stupid question you'll see on this > list > >>> for > >>>> a while, but anyway, > >>>> In an 'if..else' statement, I want to (if a condition is met) change > >>>> to > a > >>>> totally new php page in the browser window. I know this is simple (in > fact > >>> i > >>>> had it working last night but have now forgotten how i did it). > >>>> > >>>> ie (no the following is NOT actual PHP....sheesh :) > >>>> > >>>> If a=1 > >>>> go to required_page.php > >>>> else > >>>> do nothing > >>>> > >>>> Thanks in advance, > >>>> Brad > >>>> > >>> > >>> > >>> > >>> > >>> > >>> -- > >>> PHP General Mailing List (http://www.php.net/) > >>> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > >>> For additional commands, e-mail: php-general-help@lists.php.net > >>> To contact the list administrators, e-mail: php-list-admin@lists.php.net > >>> > >> > >> > >> -- > >> PHP General Mailing List (http://www.php.net/) > >> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > >> For additional commands, e-mail: php-general-help@lists.php.net > >> To contact the list administrators, e-mail: php-list-admin@lists.php.net > >> > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#56434) next »