Re: [PHP] header question

2002-09-11 Thread Chris Shiflett

You should always use a full URL in a Location header. Though browsers 
may handle improper uses of this header, it is still a bad practice.

Happy hacking.

Chris

Krzysztof Dziekiewicz wrote:

>>On Wed, 11 Sep 2002, Meltem Demirkus wrote:
>>
>>
>>>I want to know if there is any way to send data in
>>>header("Location:login.php") .I know how to send like this   >>href=\"login.php?id=$ID\">  but I need to use header and I dont know howto
>>>do this?...
>>>  
>>>
>>header( "Location: login.php?id=${ID}" );
>>
>>
>What for {} ?
>Rather: header( "Location: login.php?id=$ID" );
>


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




Re: [PHP] header question

2002-09-11 Thread Krzysztof Dziekiewicz

> On Wed, 11 Sep 2002, Meltem Demirkus wrote:

>> I want to know if there is any way to send data in
>> header("Location:login.php") .I know how to send like this   > href=\"login.php?id=$ID\">  but I need to use header and I dont know howto
>> do this?...

> header( "Location: login.php?id=${ID}" );

What for {} ?
Rather: header( "Location: login.php?id=$ID" );


-- 
Krzysztof Dziekiewicz


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




Re: [PHP] header question

2002-09-11 Thread Chris Wesley

On Wed, 11 Sep 2002, Meltem Demirkus wrote:

> I want to know if there is any way to send data in
> header("Location:login.php") .I know how to send like thishref=\"login.php?id=$ID\">  but I need to use header and I dont know howto
> do this?...

header( "Location: login.php?id=${ID}" );

~Chris


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




Re: [PHP] header() question

2002-04-01 Thread Erik Price


On Monday, April 1, 2002, at 03:47  PM, martinahingis wrote:

> I think the question is not the top of the page, the top frame of the
> window. Isn't it?

Oh yeah, you're right.  I was thinking along the lines of what that 
other guy suggested -- that all pages revert to _top by default (which 
now I remember is not the case).

Sorry for the completely inappropriate suggestion.


Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




Re: [PHP] header() question

2002-04-01 Thread martinahingis

I think the question is not the top of the page, the top frame of the
window. Isn't it?

If so you should use Javascript instead of PHP.

top.window.location.href=http://yoursite.com/yourpage.php;


---
martina.

"Erik Price" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> On Monday, April 1, 2002, at 01:49  PM, Patrick Hartnett wrote:
>
> > So any use of header("Location=...") automatically does what amounts to
> > a target="_top"?  If so, then ignore this entire post, cuz that answers
> > the question.  If not, does anyone know how to force a target="_top"
> > when using header("Location=...")?
>
> Why not just create an anchor ID at the top of the page, and then make
> the header argument point to that?  This will work on more browsers than
> "_top" anyway.  Like so:
>
> // this is the HTML page you want to point to
>   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> http://www.w3.org/1999/xhtml";>
> 
>Test
>
> 
> 
> 
>
>
> 
> 
> 
>
> // and this is your PHP code
> header('Location: http://www.domain.com/testpage.php#topofpage');
>
>
>
>
> HTH,
>
> Erik
>
>
>
>
> 
>
> Erik Price
> Web Developer Temp
> Media Lab, H.H. Brown
> [EMAIL PROTECTED]
>



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




Re: [PHP] header() question

2002-04-01 Thread Erik Price


On Monday, April 1, 2002, at 01:49  PM, Patrick Hartnett wrote:

> So any use of header("Location=...") automatically does what amounts to 
> a target="_top"?  If so, then ignore this entire post, cuz that answers 
> the question.  If not, does anyone know how to force a target="_top" 
> when using header("Location=...")?

Why not just create an anchor ID at the top of the page, and then make 
the header argument point to that?  This will work on more browsers than 
"_top" anyway.  Like so:

// this is the HTML page you want to point to
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
http://www.w3.org/1999/xhtml";>

   Test
   









// and this is your PHP code
header('Location: http://www.domain.com/testpage.php#topofpage');




HTH,

Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




Re: [PHP] header() question

2002-04-01 Thread Patrick Hartnett


So any use of header("Location=...") automatically does what amounts to a 
target="_top"?  If so, then ignore this entire post, cuz that answers the 
question.  If not, does anyone know how to force a target="_top" when using 
header("Location=...")?


>From: "George Nicolae" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: [PHP] header() question
>Date: Mon, 1 Apr 2002 21:11:00 +0300
>
>The _top option send you to the top of a page. When you open a new location
>you go on top by default.Maybe you ask about _blank? I don't have the 
>answer
>for this last question.
>
>--
>
>
>Best regards,
>George Nicolae
>IT Manager
>___
>PaginiWeb.com  - Professional Web Design
>www.PaginiWeb.com
>
>
>"Patrick Hartnett" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> >
> > Is it possible to user the target="_top" reference when using a
> > header("Location = ...")?
> >
> > If so, anyone have an example.
> >
> > Thanks
> >
> > -patrick
> >
> > _
> > Join the world's largest e-mail service with MSN Hotmail.
> > http://www.hotmail.com
> >
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>




_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


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




Re: [PHP] header() question

2002-04-01 Thread George Nicolae

The _top option send you to the top of a page. When you open a new location
you go on top by default.Maybe you ask about _blank? I don't have the answer
for this last question.

--


Best regards,
George Nicolae
IT Manager
___
PaginiWeb.com  - Professional Web Design
www.PaginiWeb.com


"Patrick Hartnett" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>
> Is it possible to user the target="_top" reference when using a
> header("Location = ...")?
>
> If so, anyone have an example.
>
> Thanks
>
> -patrick
>
> _
> Join the world's largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>



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