Re: [Re: [Re: [Re: [PHP] Help in php]]]
| From: | Mukul Sabharwal | Date: | Thu, 12 Oct 2000 09:30:44 +0000 |
| Subject: | Re: [Re: [Re: [Re: [PHP] Help in php]]] | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-19788@lists.php.net to get a copy of this message | ||
If you understand in ASP terms then here it is :
<% @Language = VBScript %>
<%
Response.Write "<html><body>...."
Response.Redirect "http://www.yahoo.com"
This will give an error... as I've written to the page
<html<body>.... it then can't jump to another url...
this is same in case of PHP or any other langauge that
enables to write web programs....
after writing anything to the browser header()
function will produce an error... cause after writing
to the browser it can't backtrack....
--- umesh s <umeshivaswamy@usa.net> wrote: > Sir
> I did'nt get what exactly whar you are
> saying.Please explain
> indetail. My senior is asp background.With these
> answer i could not convince
> him. So please explain with example.
>
>
>
> Mukul Sabharwal <mukulsabharwal@yahoo.com> wrote:
> HTML once sent to the browser can't be changed....
> so
> header or cookies need to be sent before anything
> else.... Content Type... anything..
> --- umesh s <umeshivaswamy@usa.net> wrote: > Sir
> > As their is concept of buffering before
> > redirection
> > is their any such concept.If so please send with a
> > simple example.
> > This question was asked to me by one of my senior
> in
> > the company
> > where i am woking
> >
> >
> > Mukul Sabharwal <mukulsabharwal@yahoo.com> wrote:
> > header needs to be sent... before any thing is
> > printed
> > on the page... which also means cookies... which
> > need
> > to be sent before any html printing... so you need
> > to
> > remove the html tags... and simply put :
> >
> > if ($user = 'admin') {
> >
> > header("Location :
> > http://www.cbayindia.com/uadredi.php");
> > exit;
> >
> > }
> >
> > --- umesh s <umeshivaswamy@usa.net> wrote: >
> > uredi.php
> > >
> > > <?
> > > echo("<form action = uredi1.php method =
> post>");
> > > echo("<input type = text name = user>");
> > > echo("<input type = password name = passwd>");
> > > echo("<input type = submit value = login >");
> > > echo("</form>");
> > > ?>
> > >
> > >
> > > uredi1.php
> > >
> > > <html>
> > > <head> Sample </head>
> > > <body>
> > > <?
> > > if($user == "admin")
> > > {
> > > header("Location:
> > > http://www.cbayindia.com/uadredi.php");
> > > }
> > > ?>
> > > </body>
> > > </html>
> > >
> > >
> > > uadredi.php
> > >
> > > <?
> > > echo("How are you Umesh ?");
> > > ?>
> > >
> > > when i execute it error was
> > >
> > > Sample
> > > Warning: Cannot add header information -
> > > headers already sent by (output started at
> > > /usr/local/apache/htdocs/uredi1.php:5) in
> > > /usr/local/apache/htdocs/uredi1.php
> > > on line 8
> > >
> > >
> > >
> > >
> > > Mukul Sabharwal <mukulsabharwal@yahoo.com>
> wrote:
> > > <?php
> > >
> > > header("Location: http://www.devhome.net");
> > > exit;
> > >
> > > ?>
> > >
> > > putting a / instead of complete url will take
> you
> > to
> > > the root of the domain...
> > >
> > > hence :
> > >
> > > <?php header("Location: /");exit; ?> on
> > devhome.net
> > > would redirect to http://devhome.net/
> > >
> > > so to redirect to a dir... do /dirname/
> > >
> > > --- umesh s <umeshivaswamy@usa.net> wrote: >
> > > Respected
> > > sir
> > > > As i have started learning php i got problem
>
> > > > in redirection. One of my senior showed how
> > > > redirection is done in ASP.Is their that way
> of
> > > > redirection in php if so please mail me with
> > > > simple examples. Please do the same as quick
> > > > as possible sir
> > > >
> > > > thanking you umesh s
> > > >
> > > >
> > >
> >
>
____________________________________________________________________
> > > > Get free email and a permanent address at
> > > > http://www.netaddress.com/?N=1
> > > >
> > > > --
> > > > 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
> > > >
> > >
> > >
> > > =====
> > > To Find Out More About Me :
> http://mukul.tsx.org/
> > >
> > >
> __________________________________________________
> > > Do You Yahoo!?
> > > Get Yahoo! Mail - Free email you can access from
> > > anywhere!
> > > http://mail.yahoo.com/
> > >
> > >
> > >
> >
>
____________________________________________________________________
> > > Get free email and a permanent address at
> > http://www.netaddress.com/?N=1
> >
> >
> > =====
> > To Find Out More About Me : http://mukul.tsx.org/
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get Yahoo! Mail - Free email you can access from
> > anywhere!
> > http://mail.yahoo.com/
> >
> >
> >
>
____________________________________________________________________
> > Get free email and a permanent address at
> http://www.netaddress.com/?N=1
>
>
> =====
> To Find Out More About Me : http://mukul.tsx.org/
>
> __________________________________________________
> Do You Yahoo!?
> Get Yahoo! Mail - Free email you can access from
> anywhere!
> http://mail.yahoo.com/
>
>
>
____________________________________________________________________
> Get free email and a permanent address at
http://www.netaddress.com/?N=1
=====
To Find Out More About Me : http://mukul.tsx.org/
__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/