[PHP] Redirection

2008-05-07 Thread Ben
Is there a way to take all the variables, no matter what their names and 
values are, from the parameters in a url and POST them to another URL so 
that they don't show up in the address bar?  I've noticed a huge increase in 
my bounce rate since I added some tracking parameters to my urls, but I need 
the tracking parameters so I don't trust a client-side redirect.  Thanks. 



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



Re: [PHP] Redirection

2008-05-07 Thread Kyle Browning

Javascript can help you there.


On May 7, 2008, at 4:55 PM, Ben wrote:

Is there a way to take all the variables, no matter what their names  
and
values are, from the parameters in a url and POST them to another  
URL so
that they don't show up in the address bar?  I've noticed a huge  
increase in
my bounce rate since I added some tracking parameters to my urls,  
but I need
the tracking parameters so I don't trust a client-side redirect.   
Thanks.




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




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



Re: [PHP] Redirection

2008-05-07 Thread TG

I believe you can use cURL to create POST requests.

-TG

- Original Message -
From: Ben [EMAIL PROTECTED]
To: php-general@lists.php.net
Date: Wed, 7 May 2008 17:55:34 -0600
Subject: [PHP] Redirection

 Is there a way to take all the variables, no matter what their names and 
 values are, from the parameters in a url and POST them to another URL so 
 that they don't show up in the address bar?  I've noticed a huge increase 
in 
 my bounce rate since I added some tracking parameters to my urls, but I 
need 
 the tracking parameters so I don't trust a client-side redirect.  Thanks. 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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



Re: [PHP] Redirection

2008-05-07 Thread Nathan Nobbe
On Wed, May 7, 2008 at 5:55 PM, Ben [EMAIL PROTECTED] wrote:

 Is there a way to take all the variables, no matter what their names and
 values are, from the parameters in a url and POST them to another URL so
 that they don't show up in the address bar?  I've noticed a huge increase
 in
 my bounce rate since I added some tracking parameters to my urls, but I
 need
 the tracking parameters so I don't trust a client-side redirect.  Thanks.


maybe you could use mod_rewrite and remove the tracking vars from the urls ?

-nathan


Re: [PHP] Redirection with header (was Re: [PHP] Cookies and sent headers)

2007-08-20 Thread Wouter van Vliet / Interpotential
On 20/08/07, tedd [EMAIL PROTECTED] wrote:

 At 10:40 PM +0200 8/19/07, Wouter van Vliet / Interpotential wrote:
 What you're proposing, is to actually display some content on another
 page
 then were the content is originally intended? I'm sorry, but I would
 consider that 'bad practice'. To me, it makes perfect sense that you
 don't
 want to leave the user on the page where login was originally handled.
 For
 various reasons. One very obvious would be the 'refresh thing', where
 your
 browser asks the user if they want to send the form again. Quite
 annoying.
 Then, what about bookmarks? ...


 No, what I had proposed was an alternate method to accomplish what
 you said you wanted. But, it appears that my efforts and the demo did
 not receive sufficient attention for you to understand what wass
 being presented. Instead, you tell me that what I've shown you is bad
 practice -- interesting.


First of all - I didn't ask the initial question ;-). Other than that, I
think our philosophies our basically the same. But when you say that you are
redirecting the user to another page, while you are actually including a php
script - that's not my understanding of redirecting.

You said that you wanted to remove login from the browser history,
 which is screwing around with the user's browser and is clearly bad
 practice.


Generally yes, removing a page from the browser's history would be
considered bad practice. However, we are not really talking about a page
here. What I understood from the initial question is as follows:

 - http://www.site.com/ contains some login form, action of that form is
(for example) /login.php
 - The user is sent to /login.php where the login is checked
 - From there, the user either gets to a content page where it would
typically show welcome {user} or something, or back to the index page when
login failed
 - As you see, login.php is not really a page but more of a 'pseudo page'
and therefore I cannot see any reason not to send a proper 303 header. see:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

My method simply stops the user from visiting the same page more than
 once during a session and leaves their browser data alone -- nothing
 bad practice about that!

 AFTER my demo runs, if you repeatedly refresh the page you are
 directed to, then certainly that would become annoying. But that
 wasn't the intent, nor part of the demo, which you clearly didn't
 read and obviously didn't understand.

 As far as bookmarking the page, but of course you can bookmark the
 page! Did you even try?

 Oh well, so much for trying to help someone understand sessions. As
 my mother often said No good deed ever goes unpunished.


I've got another one, There is no selfless good deed.

If you had simply said, I don't understand, please explain; or asked
 a question or two; or said thanks, but no thanks, I'm going to do it
 another way, then that would have been fine. But to say that the demo
 I prepared for you exhibited bad practice, especially when you are
 absolutely friggen clueless as to what it is doing, is a bit too much
 -- I'll be sure to pass over your post in the future.


I don't think there wasn't anybody who didn't appriciate your suggestion.
Only thing I was trying to do was chip in my two cents. Again, I wasn't the
one who originally asked the question and I certainly am not friggen
clueless. I just came to think about what the teacher at my Flex course
from a couple of months ago said about good and bad practice. He said
there is none. If your solution works good for you, that's your good
practice. And if mine doesn't work for you, it's your bad practice - while
it is still my good practice.

Something however I am trying to fight against, if you let me put it like
that - is people approaching scripts as if they are pages. When you are
including a script that is usually called as a page into another script
you should be very aware for any clashes between variables. Another reason
why it may be easier to just put in a Location: header and call your script
as it was originally intended.

Wouter

tedd

 ---

 
 I would definately go for the Location: header solution!
 
 On 19/08/07, tedd [EMAIL PROTECTED] wrote:
 
   At 8:52 AM +0200 8/19/07, Otto Wyss wrote:
   In my case I could easilly do without redirection but just exit and
   fall back on the calling page. Yet I want to remove the login page
   from the browser history. Does the header function have the same
   effect?
   
 
   O. Wyss:
 
   Instead of messing with the user's browser (not good IMO), why not
   use $_SESSION and make it such that if the user selects the log-on
   page again, they are redirected to another page? You don't even need
   header() to do that.
 
   Here's an example:
 
http://webbytedd.com/bb/one-time
 
   You will only see that page only once -- unless you find a way to
   clear the session.
 
   The process is simply to set a session variable and allow the user to
   see the page once. Upon 

Re: [PHP] Redirection with header (was Re: [PHP] Cookies and sent headers)

2007-08-20 Thread tedd

At 12:42 PM +0200 8/20/07, Wouter van Vliet / Interpotential wrote:
Only thing I was trying to do was chip in my two cents. Again, I 
wasn't the one who originally asked the question and I certainly am 
not friggen clueless.


Maybe not, but you made some pretty clueless remarks -- like if you 
could book-mark the page, the annoying refresh remark, and saying the 
demo displayed bad practice. None were germane to the intent of the 
demo, let alone valid.



I just came to think about what the teacher at my Flex course from a 
couple of months ago said about good and bad practice. He said 
there is none. If your solution works good for you, that's your good 
practice. And if mine doesn't work for you, it's your bad practice - 
while it is still my good practice.


That's just an excuse to do what you want and call it good -- but, 
there are good and bad practices.


Something however I am trying to fight against, if you let me put 
it like that - is people approaching scripts as if they are 
pages. When you are including a script that is usually called as 
a page into another script you should be very aware for any clashes 
between variables. Another reason why it may be easier to just put 
in a Location: header and call your script as it was originally 
intended.


Now, I'm clueless as to what you're talking about.

I think most people agree as to what a web page is and if we are 
using web languages to communicate with the user, then that is our 
medium. There are many ways to use web pages and Location: is only 
one of them. Limit yourself as you see fit.


tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



[PHP] Redirection with header (was Re: [PHP] Cookies and sent headers)

2007-08-19 Thread Otto Wyss

M. Sokolewicz wrote:

emits). Now, I'm not going to go into how redirecting that way won't
work (or at least shouldn't), but a hint would be to do it properly
using header('Location: [...]') instead.


I'm aware that using Javascript within a PHP code block doesn't seems
logical yet I haven't known header ('Location...). In my case I could 
easilly do without redirection but just exit and fall back on the 
calling page. Yet I want to remove the login page from the browser 
history. Does the header function have the same effect?


O. Wyss

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



Re: [PHP] Redirection with header (was Re: [PHP] Cookies and sent headers)

2007-08-19 Thread tedd

At 8:52 AM +0200 8/19/07, Otto Wyss wrote:
In my case I could easilly do without redirection but just exit and 
fall back on the calling page. Yet I want to remove the login page 
from the browser history. Does the header function have the same 
effect?




O. Wyss:

Instead of messing with the user's browser (not good IMO), why not 
use $_SESSION and make it such that if the user selects the log-on 
page again, they are redirected to another page? You don't even need 
header() to do that.


Here's an example:

http://webbytedd.com/bb/one-time

You will only see that page only once -- unless you find a way to 
clear the session.


The process is simply to set a session variable and allow the user to 
see the page once. Upon returning, the session variable is checked 
and if it is not null, then the user is redirected to another page 
like so:


if($visit != null)
{
ob_clean();
include('a.php');
exit(0);
}

Very simple.

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Redirection with header (was Re: [PHP] Cookies and sent headers)

2007-08-19 Thread Wouter van Vliet / Interpotential
What you're proposing, is to actually display some content on another page
then were the content is originally intended? I'm sorry, but I would
consider that 'bad practice'. To me, it makes perfect sense that you don't
want to leave the user on the page where login was originally handled. For
various reasons. One very obvious would be the 'refresh thing', where your
browser asks the user if they want to send the form again. Quite annoying.
Then, what about bookmarks? ...

I would definately go for the Location: header solution!

On 19/08/07, tedd [EMAIL PROTECTED] wrote:

 At 8:52 AM +0200 8/19/07, Otto Wyss wrote:
 In my case I could easilly do without redirection but just exit and
 fall back on the calling page. Yet I want to remove the login page
 from the browser history. Does the header function have the same
 effect?
 

 O. Wyss:

 Instead of messing with the user's browser (not good IMO), why not
 use $_SESSION and make it such that if the user selects the log-on
 page again, they are redirected to another page? You don't even need
 header() to do that.

 Here's an example:

 http://webbytedd.com/bb/one-time

 You will only see that page only once -- unless you find a way to
 clear the session.

 The process is simply to set a session variable and allow the user to
 see the page once. Upon returning, the session variable is checked
 and if it is not null, then the user is redirected to another page
 like so:

 if($visit != null)
 {
 ob_clean();
 include('a.php');
 exit(0);
 }

 Very simple.

 Cheers,

 tedd

 --
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com

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




-- 
Interpotential.com
Phone: +31615397471


Re: [PHP] Redirection with header (was Re: [PHP] Cookies and sent headers)

2007-08-19 Thread tedd

At 10:40 PM +0200 8/19/07, Wouter van Vliet / Interpotential wrote:

What you're proposing, is to actually display some content on another page
then were the content is originally intended? I'm sorry, but I would
consider that 'bad practice'. To me, it makes perfect sense that you don't
want to leave the user on the page where login was originally handled. For
various reasons. One very obvious would be the 'refresh thing', where your
browser asks the user if they want to send the form again. Quite annoying.
Then, what about bookmarks? ...



No, what I had proposed was an alternate method to accomplish what 
you said you wanted. But, it appears that my efforts and the demo did 
not receive sufficient attention for you to understand what wass 
being presented. Instead, you tell me that what I've shown you is bad 
practice -- interesting.


You said that you wanted to remove login from the browser history, 
which is screwing around with the user's browser and is clearly bad 
practice.


My method simply stops the user from visiting the same page more than 
once during a session and leaves their browser data alone -- nothing 
bad practice about that!


AFTER my demo runs, if you repeatedly refresh the page you are 
directed to, then certainly that would become annoying. But that 
wasn't the intent, nor part of the demo, which you clearly didn't 
read and obviously didn't understand.


As far as bookmarking the page, but of course you can bookmark the 
page! Did you even try?


Oh well, so much for trying to help someone understand sessions. As 
my mother often said No good deed ever goes unpunished.


If you had simply said, I don't understand, please explain; or asked 
a question or two; or said thanks, but no thanks, I'm going to do it 
another way, then that would have been fine. But to say that the demo 
I prepared for you exhibited bad practice, especially when you are 
absolutely friggen clueless as to what it is doing, is a bit too much 
-- I'll be sure to pass over your post in the future.


tedd

---



I would definately go for the Location: header solution!

On 19/08/07, tedd [EMAIL PROTECTED] wrote:


 At 8:52 AM +0200 8/19/07, Otto Wyss wrote:
 In my case I could easilly do without redirection but just exit and
 fall back on the calling page. Yet I want to remove the login page
 from the browser history. Does the header function have the same
 effect?
 

 O. Wyss:

 Instead of messing with the user's browser (not good IMO), why not
 use $_SESSION and make it such that if the user selects the log-on
 page again, they are redirected to another page? You don't even need
 header() to do that.

 Here's an example:


  http://webbytedd.com/bb/one-time


 You will only see that page only once -- unless you find a way to
 clear the session.

 The process is simply to set a session variable and allow the user to
 see the page once. Upon returning, the session variable is checked
 and if it is not null, then the user is redirected to another page
 like so:

 if($visit != null)
 {
 ob_clean();
 include('a.php');
 exit(0);
 }

 Very simple.

 Cheers,

 tedd

 --
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com

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





--
Interpotential.com
Phone: +31615397471



--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] php redirection..

2006-12-18 Thread Richard Lynch
On Sat, December 16, 2006 5:58 am, Stut wrote:
 Casey Chu wrote:
 Well... They skip all  !-- --'s, so they skip script!--
 //--/script's.

 And you *know* this how?

 They may well skip comments in terms of what content actually gets
 indexed, but I would expect their indexer is smart enough to parse
 HTML
 comments in a script block as though it were not in an HTML comment
 because that's what a browser does. What they actually do with that
 content - execute it, or just analyze it, or whatever - we don't know.

 You can't make sweeping statements like that unless you can back it up
 with at least one reference, preferably official.

... and current, as the search engine algorithms change even faster
than Internet speeds.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] php redirection..

2006-12-18 Thread Richard Lynch
On Mon, December 18, 2006 12:08 am, Chris Shiflett wrote:
 Richard Lynch wrote:
 The old school HTTP-EQUIV of a refresh with a time and URL
 would probably be suitable for this.

 YMMV

 And it's still not PHP. :-)

 It is if you use header(). :-)

You mean Refresh is a real header?

I always thought it was just some made-up poor-man's hack for a
not-quite Location:  header, and it never really existed in its own
right as a real header.

Learn something every day.

'Course Wikipedia and W3C indicate that it's proprietary and
discourage its use, but, hey, there ya go.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] php redirection..

2006-12-18 Thread Chris Shiflett
Richard Lynch wrote:
 You mean Refresh is a real header?

Yeah, although if I remember correctly, the W3C really dislikes people
using it for redirection instead of just refreshing the current URL. If
that's the case, however, why can we indicate the URL at all? :-)

A few years ago, someone conducted some pretty extensive research into
browser support for Refresh. I can't seem to find the URL, but the
results demonstrated extremely widespread support. (I can't imagine
support for a real HTTP header being poorer than support for the same
header expressed as http-equiv.)

Anyway, it's as real as Content-Disposition. :-)

Chris

-- 
Chris Shiflett
http://shiflett.org/

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



Re: [PHP] php redirection..

2006-12-17 Thread Chris Shiflett
Tim wrote:
 Considering bruce wants to be able to display the data and then
 change location after a given time, and as stut said you can't
 do this with a header() as it redirects before output

Sure you can. Just use a Refresh header instead of Location.

Chris

-- 
Chris Shiflett
http://shiflett.org/

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



Re: [PHP] php redirection..

2006-12-17 Thread Chris Shiflett
Richard Lynch wrote:
 The old school HTTP-EQUIV of a refresh with a time and URL
 would probably be suitable for this.
 
 YMMV
 
 And it's still not PHP. :-)

It is if you use header(). :-)

Chris

-- 
Chris Shiflett
http://shiflett.org/

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



Re: [PHP] php redirection..

2006-12-16 Thread Stut

Casey Chu wrote:
Well... They skip all  !-- --'s, so they skip script!-- 
//--/script's.


And you *know* this how?

They may well skip comments in terms of what content actually gets 
indexed, but I would expect their indexer is smart enough to parse HTML 
comments in a script block as though it were not in an HTML comment 
because that's what a browser does. What they actually do with that 
content - execute it, or just analyze it, or whatever - we don't know.


You can't make sweeping statements like that unless you can back it up 
with at least one reference, preferably official.


-Stut


On 12/15/06, Richard Lynch [EMAIL PROTECTED] wrote:

On Fri, December 15, 2006 10:28 pm, Casey Chu wrote:
 Actually... Search engines don't have a JavaScript interpreter.

Actually...

You don't know for sure that Google isn't using Perl's javascript
interpreter.

Unless you work for Google, have just told us something they would
consider double-secret proprietary, and are about to get fired.
:-) :-) :-)

It would not be Rocket Science for a search engine to execute the
javascript on a page in a sandbox, to analyze it for abuses, viruses,
and other things they wanted to take away points for.

I know I could almost manage that with a ton of work.

And I figure the Google engineers are probably a heck of a lot smarter
than I am, and for sure they are way more experienced.

So I'm going to assume that any dodge in JS I could come up with to
game their system, will be detected and defeated as soon as they want
to bother doing that.

But, hey, feel free to get Google to issue a statement that they do
not now nor ever will check the JS on sites as they index them, and
point to it as a reference.
:-)

--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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






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



[PHP] Re: php redirection..

2006-12-16 Thread Jonesy
On Fri, 15 Dec 2006 21:07:44 -0800, Casey Chu wrote:
 Well... They skip all  !-- --'s, so they skip script!-- //--/script's.

Wow!  You get The Prize for the best non sequitor of the day.

Jonesy
-- 
  Marvin L Jones| jonz  | W3DHJ  | linux
   38.24N  104.55W  |  @ config.com | Jonesy |  OS/2
*** Killfiling google posts: http//jonz.net/ng.htm

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



Re: [PHP] Re: php redirection..

2006-12-16 Thread Casey Chu

I believe it's spelled non-sequitur. =)

On 12/16/06, Jonesy [EMAIL PROTECTED] wrote:

On Fri, 15 Dec 2006 21:07:44 -0800, Casey Chu wrote:
 Well... They skip all  !-- --'s, so they skip script!-- //--/script's.

Wow!  You get The Prize for the best non sequitor of the day.

Jonesy
--
  Marvin L Jones| jonz  | W3DHJ  | linux
   38.24N  104.55W  |  @ config.com | Jonesy |  OS/2
*** Killfiling google posts: http//jonz.net/ng.htm

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




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



RE: [PHP] php redirection..

2006-12-15 Thread Richard Lynch
The old school HTTP-EQUIV of a refresh with a time and URL would
probably be suitable for this.

YMMV

And it's still not PHP. :-)

On Thu, December 14, 2006 11:08 am, bruce wrote:
 all these are solid posts...

 however, the original posting, was not to do a redirect on the page
 being
 presented.

 the original post, was to display some content rolling down the page,
 wait
 some time, and 'then' redirect the user to another page. i wanted to
 be able
 to accomplish this without having the user hitting some 'submit'
 button.

 thanks!


 -Original Message-
 From: Brad Fuller [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 14, 2006 8:40 AM
 To: 'PHP General List'
 Subject: RE: [PHP] php redirection..



 Better to do this on the client side with JS

 html
 head
 titleRedirect Test/title
 script language=JavaScript
 function redirect() {
   location.href='http://www.google.com/';
 }
 /script
 /head
 body onLoad=setTimeout('redirect()', 3000);
 pYou will be redirected in 3 seconds.../p
 /body
 /html


 -Original Message-
 From: Youri LACAN-BARTLEY [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 14, 2006 10:44 AM
 To: PHP General List
 Subject: Re: [PHP] php redirection..

 Budi Setiawan wrote:
  basically:
 
  cat.php
   -echo  test contentbr
   -echo  more test contentbr
 
  //redirect user
   echo
script
  location.href='foo.php';
/script
   ;
 
 
 
  Hi , im a new too..
 
  but you can try with this to delay your script running for some
 seconds
 :
  echo  test contentbr
  echo  more test contentbr
 
  // you can add :
  sleep(2);
  // this will cause your script delayed for 2 seconds
 
  //redirect user
  echo
  script
  location.href='foo.php';
  /script
  ;
 

 This would work providing you don't use output buffering, otherwise
 the
 user won't see any data whatsoever that has been sent prior to the
 sleep() call.

 
  // hhaha..
  // im just trying to help...
  //
 

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


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

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




-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] php redirection..

2006-12-15 Thread Richard Lynch
On Tue, December 12, 2006 12:51 pm, Stut wrote:
 bruce wrote:
 hey stut...

 Please don't reply to me directly, always include the mailing list.

 thanks for the reply... i did get some output...

 i also have a question as to why i couldn't get it to work when i
 used
 'header (foo.php)'

 1) The correct way to redirect using the header function is
 header('Location: http://domain.com/foo.php'); Note the absolute URL.
 2) Using header will definitely not display any output from the page.

You actually need to put in an exit; if you want to guarantee that PHP
won't send more data, and that the browser won't process it and show
it before doing the re-direct...

*MOST* of the time the Location: header gets processed so fast, you
don't see any following data, but if you pound on it enough, you'll
see that the browser *can* show the data after the re-direct, if it
feels particularly Orange at that moment in time.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] php redirection..

2006-12-15 Thread Richard Lynch
On Wed, December 13, 2006 9:41 pm, Casey Chu wrote:
 Search Engines don't like the META tag.

 Use

 scriptlocation.href='foobar.php';/scripta href='foobar.php'Foo
 Bar/a

If the search engine authors are not smart enough to make the META tag
and this JS snippet the same in their evaluation of the page, maybe
that search engine is a pretty bad one...

I don't *KNOW* but I suspect that the search engines care equally
about the META re-direct and a JS re-direct, if the search engines are
any good at what they do.

We already have enough mis-information, mostly just out-dated
information, about search engines.  Let's either provide references or
be clear that we are only guessing.

I'm only guessing.
:-)

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] php redirection..

2006-12-15 Thread Casey Chu

Actually... Search engines don't have a JavaScript interpreter.

On 12/15/06, Richard Lynch [EMAIL PROTECTED] wrote:

On Tue, December 12, 2006 12:51 pm, Stut wrote:
 bruce wrote:
 hey stut...

 Please don't reply to me directly, always include the mailing list.

 thanks for the reply... i did get some output...

 i also have a question as to why i couldn't get it to work when i
 used
 'header (foo.php)'

 1) The correct way to redirect using the header function is
 header('Location: http://domain.com/foo.php'); Note the absolute URL.
 2) Using header will definitely not display any output from the page.

You actually need to put in an exit; if you want to guarantee that PHP
won't send more data, and that the browser won't process it and show
it before doing the re-direct...

*MOST* of the time the Location: header gets processed so fast, you
don't see any following data, but if you pound on it enough, you'll
see that the browser *can* show the data after the re-direct, if it
feels particularly Orange at that moment in time.

--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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




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



Re: [PHP] php redirection..

2006-12-15 Thread Richard Lynch
On Fri, December 15, 2006 10:28 pm, Casey Chu wrote:
 Actually... Search engines don't have a JavaScript interpreter.

Actually...

You don't know for sure that Google isn't using Perl's javascript
interpreter.

Unless you work for Google, have just told us something they would
consider double-secret proprietary, and are about to get fired.
:-) :-) :-)

It would not be Rocket Science for a search engine to execute the
javascript on a page in a sandbox, to analyze it for abuses, viruses,
and other things they wanted to take away points for.

I know I could almost manage that with a ton of work.

And I figure the Google engineers are probably a heck of a lot smarter
than I am, and for sure they are way more experienced.

So I'm going to assume that any dodge in JS I could come up with to
game their system, will be detected and defeated as soon as they want
to bother doing that.

But, hey, feel free to get Google to issue a statement that they do
not now nor ever will check the JS on sites as they index them, and
point to it as a reference.
:-)

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] php redirection..

2006-12-15 Thread Casey Chu

Well... They skip all  !-- --'s, so they skip script!-- //--/script's.

On 12/15/06, Richard Lynch [EMAIL PROTECTED] wrote:

On Fri, December 15, 2006 10:28 pm, Casey Chu wrote:
 Actually... Search engines don't have a JavaScript interpreter.

Actually...

You don't know for sure that Google isn't using Perl's javascript
interpreter.

Unless you work for Google, have just told us something they would
consider double-secret proprietary, and are about to get fired.
:-) :-) :-)

It would not be Rocket Science for a search engine to execute the
javascript on a page in a sandbox, to analyze it for abuses, viruses,
and other things they wanted to take away points for.

I know I could almost manage that with a ton of work.

And I figure the Google engineers are probably a heck of a lot smarter
than I am, and for sure they are way more experienced.

So I'm going to assume that any dodge in JS I could come up with to
game their system, will be detected and defeated as soon as they want
to bother doing that.

But, hey, feel free to get Google to issue a statement that they do
not now nor ever will check the JS on sites as they index them, and
point to it as a reference.
:-)

--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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




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



RE: [PHP] php redirection..

2006-12-14 Thread bruce
bud...

if you try to use the 'sleep' function, you'll discover it doesn't
effectively wait... ie, it's not waiting a specified period of time, prior
to invoking the jscript location.href.

remember, sleep is server side, jscript is client side. i haven't thoroughly
tested this, but i imagine that this acts in a similar manner to the
'header' function as well...



-Original Message-
From: Budi Setiawan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 13, 2006 9:33 PM
To: [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Subject: Re: [PHP] php redirection..


 basically:

 cat.php
  -echo  test contentbr
  -echo  more test contentbr

 //redirect user
  echo
   script
 location.href='foo.php';
   /script
  ;



Hi , im a new too..

but you can try with this to delay your script running for some seconds :
echo  test contentbr
echo  more test contentbr

// you can add :
sleep(2);
// this will cause your script delayed for 2 seconds

//redirect user
echo
script
location.href='foo.php';
/script
;




// hhaha..
// im just trying to help...
//

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

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



Re: [PHP] php redirection..

2006-12-14 Thread Youri LACAN-BARTLEY
Budi Setiawan wrote:
 basically:

 cat.php
  -echo  test contentbr
  -echo  more test contentbr

 //redirect user
  echo
   script
 location.href='foo.php';
   /script
  ;

 
 
 Hi , im a new too..
 
 but you can try with this to delay your script running for some seconds :
 echo  test contentbr
 echo  more test contentbr
 
 // you can add :
 sleep(2);
 // this will cause your script delayed for 2 seconds
 
 //redirect user
 echo
 script
 location.href='foo.php';
 /script
 ;
 

This would work providing you don't use output buffering, otherwise the
user won't see any data whatsoever that has been sent prior to the
sleep() call.

 
 // hhaha..
 // im just trying to help...
 //
 

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



RE: [PHP] php redirection..

2006-12-14 Thread Brad Fuller

Better to do this on the client side with JS

html
head
titleRedirect Test/title
script language=JavaScript
function redirect() {
location.href='http://www.google.com/';
}
/script
/head
body onLoad=setTimeout('redirect()', 3000);
pYou will be redirected in 3 seconds.../p
/body
/html


 -Original Message-
 From: Youri LACAN-BARTLEY [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 14, 2006 10:44 AM
 To: PHP General List
 Subject: Re: [PHP] php redirection..
 
 Budi Setiawan wrote:
  basically:
 
  cat.php
   -echo  test contentbr
   -echo  more test contentbr
 
  //redirect user
   echo
script
  location.href='foo.php';
/script
   ;
 
 
 
  Hi , im a new too..
 
  but you can try with this to delay your script running for some seconds
 :
  echo  test contentbr
  echo  more test contentbr
 
  // you can add :
  sleep(2);
  // this will cause your script delayed for 2 seconds
 
  //redirect user
  echo
  script
  location.href='foo.php';
  /script
  ;
 
 
 This would work providing you don't use output buffering, otherwise the
 user won't see any data whatsoever that has been sent prior to the
 sleep() call.
 
 
  // hhaha..
  // im just trying to help...
  //
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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



RE: [PHP] php redirection..

2006-12-14 Thread bruce
all these are solid posts...

however, the original posting, was not to do a redirect on the page being
presented.

the original post, was to display some content rolling down the page, wait
some time, and 'then' redirect the user to another page. i wanted to be able
to accomplish this without having the user hitting some 'submit' button.

thanks!


-Original Message-
From: Brad Fuller [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 14, 2006 8:40 AM
To: 'PHP General List'
Subject: RE: [PHP] php redirection..



Better to do this on the client side with JS

html
head
titleRedirect Test/title
script language=JavaScript
function redirect() {
location.href='http://www.google.com/';
}
/script
/head
body onLoad=setTimeout('redirect()', 3000);
pYou will be redirected in 3 seconds.../p
/body
/html


 -Original Message-
 From: Youri LACAN-BARTLEY [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 14, 2006 10:44 AM
 To: PHP General List
 Subject: Re: [PHP] php redirection..

 Budi Setiawan wrote:
  basically:
 
  cat.php
   -echo  test contentbr
   -echo  more test contentbr
 
  //redirect user
   echo
script
  location.href='foo.php';
/script
   ;
 
 
 
  Hi , im a new too..
 
  but you can try with this to delay your script running for some seconds
 :
  echo  test contentbr
  echo  more test contentbr
 
  // you can add :
  sleep(2);
  // this will cause your script delayed for 2 seconds
 
  //redirect user
  echo
  script
  location.href='foo.php';
  /script
  ;
 

 This would work providing you don't use output buffering, otherwise the
 user won't see any data whatsoever that has been sent prior to the
 sleep() call.

 
  // hhaha..
  // im just trying to help...
  //
 

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


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

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



RE: [PHP] php redirection..

2006-12-14 Thread Brad Fuller
 -Original Message-
 From: bruce [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 14, 2006 12:08 PM
 To: 'Brad Fuller'; 'PHP General List'
 Subject: RE: [PHP] php redirection..
 
 all these are solid posts...
 
 however, the original posting, was not to do a redirect on the page being
 presented.
 
 the original post, was to display some content rolling down the page, wait
 some time, and 'then' redirect the user to another page. i wanted to be
 able
 to accomplish this without having the user hitting some 'submit' button.


Uhhh... what do you think setTimeout() does?

Did you even look at the code, let alone test it?  


 thanks!
 
 
 -Original Message-
 From: Brad Fuller [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 14, 2006 8:40 AM
 To: 'PHP General List'
 Subject: RE: [PHP] php redirection..
 
 
 
 Better to do this on the client side with JS
 
 html
 head
 titleRedirect Test/title
 script language=JavaScript
 function redirect() {
   location.href='http://www.google.com/';
 }
 /script
 /head
 body onLoad=setTimeout('redirect()', 3000);
 pYou will be redirected in 3 seconds.../p
 /body
 /html
 
 
  -Original Message-
  From: Youri LACAN-BARTLEY [mailto:[EMAIL PROTECTED]
  Sent: Thursday, December 14, 2006 10:44 AM
  To: PHP General List
  Subject: Re: [PHP] php redirection..
 
  Budi Setiawan wrote:
   basically:
  
   cat.php
-echo  test contentbr
-echo  more test contentbr
  
   //redirect user
echo
 script
   location.href='foo.php';
 /script
;
  
  
  
   Hi , im a new too..
  
   but you can try with this to delay your script running for some
 seconds
  :
   echo  test contentbr
   echo  more test contentbr
  
   // you can add :
   sleep(2);
   // this will cause your script delayed for 2 seconds
  
   //redirect user
   echo
   script
   location.href='foo.php';
   /script
   ;
  
 
  This would work providing you don't use output buffering, otherwise the
  user won't see any data whatsoever that has been sent prior to the
  sleep() call.
 
  
   // hhaha..
   // im just trying to help...
   //
  
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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



Re: [PHP] php redirection..

2006-12-13 Thread Youri LACAN-BARTLEY

Tim wrote:
 Just a quick question regarding this issue.
 
 Considering bruce wants to be able to display the data and then change
 location after a given time, and as stut said you can't do this with a
 header() as it redirects before output, I would have imagined a dynamic meta
 tag in the header with a time variable and a location variable.
 
 But then I wonder what affect this has regards to html standards? 
 Are dynamic meta tags depreciated?

What exactly do you have in mind when you mention dynamic meta tags?
Do you just mean using a meta refresh tag?

meta http-equiv=refresh content=2;url=http://www.example.com;

I believe that would be the best solution to Bruce's problem.
This meta tag can be used on the page with the information to be shown
and automatically redirected to the URL specified in the tag after n
seconds. In the above example, redirection to www.example.com will
happen after 2 seconds.

Good luck Bruce

 
 Regards,
 Tim
 
 -Message d'origine-
 De : Stut [mailto:[EMAIL PROTECTED]
 Envoyé : mardi 12 décembre 2006 19:52
 À : [EMAIL PROTECTED]
 Cc : php
 Objet : Re: [PHP] php redirection..

 bruce wrote:
 hey stut...
 Please don't reply to me directly, always include the mailing list.

 thanks for the reply... i did get some output...

 i also have a question as to why i couldn't get it to work when i used
 'header (foo.php)'
 1) The correct way to redirect using the header function is
 header('Location: http://domain.com/foo.php'); Note the absolute URL.
 2) Using header will definitely not display any output from the page.

 i did a 'ob_end_flush()' at the start, followed by a 'header()' at the
 end,
 but the header didn't seem to function as i though it should.
 I suggest you read about the header function in the manual
 (http://php.net/header) - you clearly don't have any idea what it does.

 given that the ultimate information that i'm going to want to display
 will
 be dynamic. some times it might be 5 lines, others 100, others 50...

 i had hoped that i could somehow display the content, wait a few
 seconds,
 and then do an auto redirect...
 Like I said in my first reply, Google for the Javascript function
 settimeout - that's what you need.

 any thoughts/comments...
 I have lots of comments. Thoughts are less common but they do
 occasionally happen.

 -Stut

 -Original Message-
 From: Stut [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 12, 2006 9:21 AM
 To: [EMAIL PROTECTED]
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] php redirection..


 bruce wrote:
 i want to be able to display some text/content and to then redirect the
 user
 to another page.

 basically:

 cat.php
  -echo  test contentbr
  -echo  more test contentbr

 //redirect user
  echo
   script
 location.href='foo.php';
   /script
  ;

 ---
 foo.php
  -echo i'm here


 should be pretty simple...

 however, in my test, without the script/location.href i display the
 content
 ok. when i add the script/location.href, i get redirected, but the
 content
 is never displayed...

 any thoughts/samples/pointers on what might be going on, and how this
 should
 really be accomplished..

 to be honest, i'm embarrassed to even be raising this here!!
 And so you should be what with it being a Javascript question and this
 being a PHP list.

 Anyhoo, I don't get your confusion. The browser will run the script as
 it loads it from your site. Ergo, it redirects before it displays what
 you have output. I suggest you Google for examples of the settimeout
 Javscript function - that's what you need to delay the redirect.

 -Stut

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

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

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



RE: [PHP] php redirection..

2006-12-13 Thread Tim
 -Message d'origine-
 De : Youri LACAN-BARTLEY [mailto:[EMAIL PROTECTED]
 Envoyé : mercredi 13 décembre 2006 09:09
 Cc : 'php'
 Objet : Re: [PHP] php redirection..
 
 
 Tim wrote:
  Just a quick question regarding this issue.
 
  Considering bruce wants to be able to display the data and then change
  location after a given time, and as stut said you can't do this with a
  header() as it redirects before output, I would have imagined a dynamic
 meta
  tag in the header with a time variable and a location variable.
 
  But then I wonder what affect this has regards to html standards?
  Are dynamic meta tags depreciated?
 
 What exactly do you have in mind when you mention dynamic meta tags?
 Do you just mean using a meta refresh tag?
 
Yes I meant just using a meta refresh tag with php variables to make it more
flexible:

echo 'meta http-equiv=refresh content=' . $time . ';url=' . $url . '';

I modify meta title/content this way aswell. 

 meta http-equiv=refresh content=2;url=http://www.example.com;
 
 I believe that would be the best solution to Bruce's problem.
 This meta tag can be used on the page with the information to be shown
 and automatically redirected to the URL specified in the tag after n
 seconds. In the above example, redirection to www.example.com will
 happen after 2 seconds.
 
 Good luck Bruce
 
 
  Regards,
  Tim
 
  -Message d'origine-
  De : Stut [mailto:[EMAIL PROTECTED]
  Envoyé : mardi 12 décembre 2006 19:52
  À : [EMAIL PROTECTED]
  Cc : php
  Objet : Re: [PHP] php redirection..
 
  bruce wrote:
  hey stut...
  Please don't reply to me directly, always include the mailing list.
 
  thanks for the reply... i did get some output...
 
  i also have a question as to why i couldn't get it to work when i used
  'header (foo.php)'
  1) The correct way to redirect using the header function is
  header('Location: http://domain.com/foo.php'); Note the absolute URL.
  2) Using header will definitely not display any output from the page.
 
  i did a 'ob_end_flush()' at the start, followed by a 'header()' at the
  end,
  but the header didn't seem to function as i though it should.
  I suggest you read about the header function in the manual
  (http://php.net/header) - you clearly don't have any idea what it does.
 
  given that the ultimate information that i'm going to want to display
  will
  be dynamic. some times it might be 5 lines, others 100, others 50...
 
  i had hoped that i could somehow display the content, wait a few
  seconds,
  and then do an auto redirect...
  Like I said in my first reply, Google for the Javascript function
  settimeout - that's what you need.
 
  any thoughts/comments...
  I have lots of comments. Thoughts are less common but they do
  occasionally happen.
 
  -Stut
 
  -Original Message-
  From: Stut [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, December 12, 2006 9:21 AM
  To: [EMAIL PROTECTED]
  Cc: php-general@lists.php.net
  Subject: Re: [PHP] php redirection..
 
 
  bruce wrote:
  i want to be able to display some text/content and to then redirect
 the
  user
  to another page.
 
  basically:
 
  cat.php
   -echo  test contentbr
   -echo  more test contentbr
 
  //redirect user
   echo
script
  location.href='foo.php';
/script
   ;
 
  ---
  foo.php
   -echo i'm here
 
 
  should be pretty simple...
 
  however, in my test, without the script/location.href i display the
  content
  ok. when i add the script/location.href, i get redirected, but the
  content
  is never displayed...
 
  any thoughts/samples/pointers on what might be going on, and how this
  should
  really be accomplished..
 
  to be honest, i'm embarrassed to even be raising this here!!
  And so you should be what with it being a Javascript question and this
  being a PHP list.
 
  Anyhoo, I don't get your confusion. The browser will run the script as
  it loads it from your site. Ergo, it redirects before it displays what
  you have output. I suggest you Google for examples of the settimeout
  Javscript function - that's what you need to delay the redirect.
 
  -Stut
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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



RE: [PHP] php redirection..

2006-12-13 Thread tedd

At 9:02 PM +0100 12/12/06, Tim wrote:

Just a quick question regarding this issue.

Considering bruce wants to be able to display the data and then change
location after a given time, and as stut said you can't do this with a
header() as it redirects before output, I would have imagined a dynamic meta
tag in the header with a time variable and a location variable.



Why not use the standard meta refresh tag? It's worked for me before.

tedd

PS:

I have lots of comments. Thoughts are less common but they do 
occasionally happen.


-Stut



LOL
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] php redirection..

2006-12-13 Thread Casey Chu

Search Engines don't like the META tag.

Use

scriptlocation.href='foobar.php';/scripta href='foobar.php'Foo Bar/a

On 12/13/06, tedd [EMAIL PROTECTED] wrote:

At 9:02 PM +0100 12/12/06, Tim wrote:
Just a quick question regarding this issue.

Considering bruce wants to be able to display the data and then change
location after a given time, and as stut said you can't do this with a
header() as it redirects before output, I would have imagined a dynamic meta
tag in the header with a time variable and a location variable.


Why not use the standard meta refresh tag? It's worked for me before.

tedd

PS:

I have lots of comments. Thoughts are less common but they do
occasionally happen.

-Stut


LOL
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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




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



Re: [PHP] php redirection..

2006-12-13 Thread Budi Setiawan

basically:

cat.php
 -echo  test contentbr
 -echo  more test contentbr

//redirect user
 echo
  script
location.href='foo.php';
  /script
 ;




Hi , im a new too..

but you can try with this to delay your script running for some seconds :
echo  test contentbr
echo  more test contentbr

// you can add :
sleep(2);
// this will cause your script delayed for 2 seconds

//redirect user
echo
script
location.href='foo.php';
/script
;




// hhaha..
// im just trying to help...
//

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



Re: [PHP] php redirection..

2006-12-13 Thread Casey Chu

It's usually OK if it's 8 seconds or more, but that would take too long.

See here for info:
http://www.netmechanic.com/news/vol4/promo_no15.htm

On 12/13/06, Budi Setiawan [EMAIL PROTECTED] wrote:

 basically:

 cat.php
  -echo  test contentbr
  -echo  more test contentbr

 //redirect user
  echo
   script
 location.href='foo.php';
   /script
  ;



Hi , im a new too..

but you can try with this to delay your script running for some seconds :
echo  test contentbr
echo  more test contentbr

// you can add :
sleep(2);
// this will cause your script delayed for 2 seconds

//redirect user
echo
script
location.href='foo.php';
/script
;




// hhaha..
// im just trying to help...
//

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




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



[PHP] php redirection..

2006-12-12 Thread bruce
hi...

i have what should be a pretty simple question that i'm obviously missing
something for...

i want to be able to display some text/content and to then redirect the user
to another page.

basically:

cat.php
 -echo  test contentbr
 -echo  more test contentbr

//redirect user
 echo
  script
location.href='foo.php';
  /script
 ;

---
foo.php
 -echo i'm here


should be pretty simple...

however, in my test, without the script/location.href i display the content
ok. when i add the script/location.href, i get redirected, but the content
is never displayed...

any thoughts/samples/pointers on what might be going on, and how this should
really be accomplished..

to be honest, i'm embarrassed to even be raising this here!!

thanks.

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



Re: [PHP] php redirection..

2006-12-12 Thread Stut

bruce wrote:

i want to be able to display some text/content and to then redirect the user
to another page.

basically:

cat.php
 -echo  test contentbr
 -echo  more test contentbr

//redirect user
 echo
  script
location.href='foo.php';
  /script
 ;

---
foo.php
 -echo i'm here


should be pretty simple...

however, in my test, without the script/location.href i display the content
ok. when i add the script/location.href, i get redirected, but the content
is never displayed...

any thoughts/samples/pointers on what might be going on, and how this should
really be accomplished..

to be honest, i'm embarrassed to even be raising this here!!


And so you should be what with it being a Javascript question and this 
being a PHP list.


Anyhoo, I don't get your confusion. The browser will run the script as 
it loads it from your site. Ergo, it redirects before it displays what 
you have output. I suggest you Google for examples of the settimeout 
Javscript function - that's what you need to delay the redirect.


-Stut

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



Re: [PHP] php redirection..

2006-12-12 Thread Stut

bruce wrote:

hey stut...


Please don't reply to me directly, always include the mailing list.


thanks for the reply... i did get some output...

i also have a question as to why i couldn't get it to work when i used
'header (foo.php)'


1) The correct way to redirect using the header function is 
header('Location: http://domain.com/foo.php'); Note the absolute URL.

2) Using header will definitely not display any output from the page.


i did a 'ob_end_flush()' at the start, followed by a 'header()' at the end,
but the header didn't seem to function as i though it should.


I suggest you read about the header function in the manual 
(http://php.net/header) - you clearly don't have any idea what it does.



given that the ultimate information that i'm going to want to display will
be dynamic. some times it might be 5 lines, others 100, others 50...

i had hoped that i could somehow display the content, wait a few seconds,
and then do an auto redirect...


Like I said in my first reply, Google for the Javascript function 
settimeout - that's what you need.



any thoughts/comments...


I have lots of comments. Thoughts are less common but they do 
occasionally happen.


-Stut


-Original Message-
From: Stut [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 12, 2006 9:21 AM
To: [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Subject: Re: [PHP] php redirection..


bruce wrote:

i want to be able to display some text/content and to then redirect the

user

to another page.

basically:

cat.php
 -echo  test contentbr
 -echo  more test contentbr

//redirect user
 echo
  script
location.href='foo.php';
  /script
 ;

---
foo.php
 -echo i'm here


should be pretty simple...

however, in my test, without the script/location.href i display the

content

ok. when i add the script/location.href, i get redirected, but the content
is never displayed...

any thoughts/samples/pointers on what might be going on, and how this

should

really be accomplished..

to be honest, i'm embarrassed to even be raising this here!!


And so you should be what with it being a Javascript question and this
being a PHP list.

Anyhoo, I don't get your confusion. The browser will run the script as
it loads it from your site. Ergo, it redirects before it displays what
you have output. I suggest you Google for examples of the settimeout
Javscript function - that's what you need to delay the redirect.

-Stut

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



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



RE: [PHP] php redirection..

2006-12-12 Thread Tim
Just a quick question regarding this issue.

Considering bruce wants to be able to display the data and then change
location after a given time, and as stut said you can't do this with a
header() as it redirects before output, I would have imagined a dynamic meta
tag in the header with a time variable and a location variable.

But then I wonder what affect this has regards to html standards? 
Are dynamic meta tags depreciated?

Regards,
Tim

 -Message d'origine-
 De : Stut [mailto:[EMAIL PROTECTED]
 Envoyé : mardi 12 décembre 2006 19:52
 À : [EMAIL PROTECTED]
 Cc : php
 Objet : Re: [PHP] php redirection..
 
 bruce wrote:
  hey stut...
 
 Please don't reply to me directly, always include the mailing list.
 
  thanks for the reply... i did get some output...
 
  i also have a question as to why i couldn't get it to work when i used
  'header (foo.php)'
 
 1) The correct way to redirect using the header function is
 header('Location: http://domain.com/foo.php'); Note the absolute URL.
 2) Using header will definitely not display any output from the page.
 
  i did a 'ob_end_flush()' at the start, followed by a 'header()' at the
 end,
  but the header didn't seem to function as i though it should.
 
 I suggest you read about the header function in the manual
 (http://php.net/header) - you clearly don't have any idea what it does.
 
  given that the ultimate information that i'm going to want to display
 will
  be dynamic. some times it might be 5 lines, others 100, others 50...
 
  i had hoped that i could somehow display the content, wait a few
 seconds,
  and then do an auto redirect...
 
 Like I said in my first reply, Google for the Javascript function
 settimeout - that's what you need.
 
  any thoughts/comments...
 
 I have lots of comments. Thoughts are less common but they do
 occasionally happen.
 
 -Stut
 
  -Original Message-
  From: Stut [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, December 12, 2006 9:21 AM
  To: [EMAIL PROTECTED]
  Cc: php-general@lists.php.net
  Subject: Re: [PHP] php redirection..
 
 
  bruce wrote:
  i want to be able to display some text/content and to then redirect the
  user
  to another page.
 
  basically:
 
  cat.php
   -echo  test contentbr
   -echo  more test contentbr
 
  //redirect user
   echo
script
  location.href='foo.php';
/script
   ;
 
  ---
  foo.php
   -echo i'm here
 
 
  should be pretty simple...
 
  however, in my test, without the script/location.href i display the
  content
  ok. when i add the script/location.href, i get redirected, but the
 content
  is never displayed...
 
  any thoughts/samples/pointers on what might be going on, and how this
  should
  really be accomplished..
 
  to be honest, i'm embarrassed to even be raising this here!!
 
  And so you should be what with it being a Javascript question and this
  being a PHP list.
 
  Anyhoo, I don't get your confusion. The browser will run the script as
  it loads it from your site. Ergo, it redirects before it displays what
  you have output. I suggest you Google for examples of the settimeout
  Javscript function - that's what you need to delay the redirect.
 
  -Stut
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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



RE: [PHP] php redirection..

2006-12-12 Thread Tim
Just a quick question regarding this issue.

Considering bruce wants to be able to display the data and then change
location after a given time, and as stut said you can't do this with a
header() as it redirects before output, I would have imagined a dynamic meta
tag in the header with a time variable and a location variable.

But then I wonder what affect this has regards to html standards? 
Are dynamic meta tags depreciated?

Regards,
Tim

 -Message d'origine-
 De : Stut [mailto:[EMAIL PROTECTED]
 Envoyé : mardi 12 décembre 2006 19:52
 À : [EMAIL PROTECTED]
 Cc : php
 Objet : Re: [PHP] php redirection..
 
 bruce wrote:
  hey stut...
 
 Please don't reply to me directly, always include the mailing list.
 
  thanks for the reply... i did get some output...
 
  i also have a question as to why i couldn't get it to work when i used
  'header (foo.php)'
 
 1) The correct way to redirect using the header function is
 header('Location: http://domain.com/foo.php'); Note the absolute URL.
 2) Using header will definitely not display any output from the page.
 
  i did a 'ob_end_flush()' at the start, followed by a 'header()' at the
 end,
  but the header didn't seem to function as i though it should.
 
 I suggest you read about the header function in the manual
 (http://php.net/header) - you clearly don't have any idea what it does.
 
  given that the ultimate information that i'm going to want to display
 will
  be dynamic. some times it might be 5 lines, others 100, others 50...
 
  i had hoped that i could somehow display the content, wait a few
 seconds,
  and then do an auto redirect...
 
 Like I said in my first reply, Google for the Javascript function
 settimeout - that's what you need.
 
  any thoughts/comments...
 
 I have lots of comments. Thoughts are less common but they do
 occasionally happen.
 
 -Stut
 
  -Original Message-
  From: Stut [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, December 12, 2006 9:21 AM
  To: [EMAIL PROTECTED]
  Cc: php-general@lists.php.net
  Subject: Re: [PHP] php redirection..
 
 
  bruce wrote:
  i want to be able to display some text/content and to then redirect the
  user
  to another page.
 
  basically:
 
  cat.php
   -echo  test contentbr
   -echo  more test contentbr
 
  //redirect user
   echo
script
  location.href='foo.php';
/script
   ;
 
  ---
  foo.php
   -echo i'm here
 
 
  should be pretty simple...
 
  however, in my test, without the script/location.href i display the
  content
  ok. when i add the script/location.href, i get redirected, but the
 content
  is never displayed...
 
  any thoughts/samples/pointers on what might be going on, and how this
  should
  really be accomplished..
 
  to be honest, i'm embarrassed to even be raising this here!!
 
  And so you should be what with it being a Javascript question and this
  being a PHP list.
 
  Anyhoo, I don't get your confusion. The browser will run the script as
  it loads it from your site. Ergo, it redirects before it displays what
  you have output. I suggest you Google for examples of the settimeout
  Javscript function - that's what you need to delay the redirect.
 
  -Stut
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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



Re: [PHP] Redirection after login with security

2005-04-11 Thread Jason Wong
On Monday 11 April 2005 10:48, Adam Hubscher wrote:

There seems to be 2 issues here:

 In an attempt to provide the best way to limit the # of accounts per
 person, I assumed that this could be accomplished by placing a dummy
 value only used by the site itself that is the username/encoded
 password for them on the community, and test if... when searched for in
 the database, a result set of x is discovered, then they are unable to
 create another account.

1) You want to prevent people from creating multiple accounts. Basically 
there is really nothing concrete that you can do to prevent that short of 
making them pay an extortionate amount of money before they can create a 
new account.

 Problem: I would like to possibly utilize a login system (created on
 the remote server), that would then check their username and password
 against the CMS database located there, then redirect with that
 information (encrypted of course), to the local site where the
 information gets stored in a session. Then when they go to create a new
 account, it stores the extra verfied information into the database.

 However, the issue at hand here is, I'm not sure how secure it would be
 if I were to say, create a secure login form, verify the data... and
 then create another pseudo form that directs the person to the
 local-based site using hidden post variables (this is my original
 thought on the subject).


2) You want to check the credentials of a user/password against a remote 
database. One way to do it pretty securely without having to actually 
login to the remote database is to setup something like this:

Remote database server, on this machine setup a simple webpage which grabs 
username and password from the URL. The username can be in plaintext (or 
if circumstances dictate and/or you're paranoid can be *encrypted*). The 
password is hashed (md5/sha, whatever) WITH a secret key. You can then 
verify whether username/password is correct and return an appropriate 
response.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
New Year Resolution: Ignore top posted posts

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



Re: [PHP] Redirection after login with security

2005-04-11 Thread Richard Lynch
On Sun, April 10, 2005 7:48 pm, Adam Hubscher said:
 In an attempt to provide the best way to limit the # of accounts per
 person, I assumed that this could be accomplished by placing a dummy
 value only used by the site itself that is the username/encoded password
 for them on the community, and test if... when searched for in the
 database, a result set of x is discovered, then they are unable to
 create another account.

What stops the Bad Guy from creating 47 different logins on the community
site, each with X accounts on the game system?

Nothing.

GAME OVER

Only forcing them to pay a deposit for an account on the game server will
stop abuse.

 However, the issue at hand here is, I'm not sure how secure it would be
 if I were to say, create a secure login form, verify the data... and
 then create another pseudo form that directs the person to the
 local-based site using hidden post variables (this is my original
 thought on the subject).

Hidden POST variables are *NOT* secure at all.  Totally useless.

If you control both servers, you can securely transmit the data you need
from one to the other using http://php.net/curl

Given the amount of trouble an open forum can cause these days, I would
say get a money deposit before you issue a game login, and then use cURL
to get the user's info with a DIFFERENT username/password over to the
community site.

Use the different username/password because the forum code has already
proven itself susceptible to a lot of security issues.

Make sure you never refund a deposit to somebody who can still cause
trouble -- IE, their login must be invalid before the deposit goes back.

You *CAN* refund to those users who prove themselves trustworthy over
time, on a selective basis.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



[PHP] Redirection after login with security

2005-04-10 Thread Adam Hubscher
Synopsis: I am writing a management system for a MSSql database driven 
game, and I've run into an issue. The community site is located on a 
remote webserver, to protect the actual server from any possible 
vulnerabilities in the community application/forum application (as we 
all have seen the recent issues with phpBB and various CMS systems). The 
management system grants the ability to access and modify various 
properties of your in-game account.

In an attempt to provide the best way to limit the # of accounts per 
person, I assumed that this could be accomplished by placing a dummy 
value only used by the site itself that is the username/encoded password 
for them on the community, and test if... when searched for in the 
database, a result set of x is discovered, then they are unable to 
create another account.

Problem: I would like to possibly utilize a login system (created on the 
remote server), that would then check their username and password 
against the CMS database located there, then redirect with that 
information (encrypted of course), to the local site where the 
information gets stored in a session. Then when they go to create a new 
account, it stores the extra verfied information into the database.

However, the issue at hand here is, I'm not sure how secure it would be 
if I were to say, create a secure login form, verify the data... and 
then create another pseudo form that directs the person to the 
local-based site using hidden post variables (this is my original 
thought on the subject).

Is there another way I could go about doing this (ie, a way that I could 
identify a user that is almost assuredly never going to change) or is 
there a more secure way? Or, am I on the right track?

Thanks for any help!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] redirection, same host, two domains

2005-03-25 Thread Alexandru Martin
   Okay, here is my problem. I had a site hosted on a sub domain 
(mysite.domain.com) , now I registered my own domain, mysite.com . The 
thing is mysite.com is still hosted on mysite.domain.com. What i want to 
do is :  If people type in their browsers mysite.domain.com redirect to 
mysite.com and if they type mysite.com to display the page.
   I'm guessing it should be something like this : if ( refferer = 
mysite.domain.com ) { redirect to mysite.com } else { my html code }

P.S:  I need this because I don't want google to think it's a duplicate 
site.

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


Re: [PHP] redirection, same host, two domains

2005-03-25 Thread maillists
On Friday 25 March 2005 11:36, Alexandru Martin wrote:
 Okay, here is my problem. I had a site hosted on a sub domain
 (mysite.domain.com) , now I registered my own domain, mysite.com . The
 thing is mysite.com is still hosted on mysite.domain.com. What i want to
 do is :  If people type in their browsers mysite.domain.com redirect to
 mysite.com and if they type mysite.com to display the page.
 I'm guessing it should be something like this : if ( refferer =
 mysite.domain.com ) { redirect to mysite.com } else { my html code }

This probably would be better accomplished through apache and DNS

-- 
Win a Vespa Scooter or a Dell Gift Card worth $3,000.00
http://www.morningstarcom.net/raffle-contest.php

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

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



Re: [PHP] redirection, same host, two domains

2005-03-25 Thread Ken
On Fri, 25 Mar 2005 11:42:15 -0500, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 On Friday 25 March 2005 11:36, Alexandru Martin wrote:
  Okay, here is my problem. I had a site hosted on a sub domain
  (mysite.domain.com) , now I registered my own domain, mysite.com . The
  thing is mysite.com is still hosted on mysite.domain.com. What i want to
  do is :  If people type in their browsers mysite.domain.com redirect to
  mysite.com and if they type mysite.com to display the page.
  I'm guessing it should be something like this : if ( refferer =
  mysite.domain.com ) { redirect to mysite.com } else { my html code }
 
 This probably would be better accomplished through apache and DNS
 
 --
 Win a Vespa Scooter or a Dell Gift Card worth $3,000.00
 http://www.morningstarcom.net/raffle-contest.php
 
 --
 This message has been scanned for viruses and
 dangerous content by MailScanner, and is
 believed to be clean.
 MailScanner thanks transtec Computers for their support.
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

If it's running apache stick this in a file named .htaccess and place
it in the web root folder

Redirect 301 / http://www.mysite.com

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



Re: [PHP] redirection, same host, two domains

2005-03-25 Thread Leif Gregory
Hello Alexandru,

Friday, March 25, 2005, 9:36:12 AM, you wrote:
AM Okay, here is my problem. I had a site hosted on a sub domain
AM (mysite.domain.com) , now I registered my own domain, mysite.com .
AM The thing is mysite.com is still hosted on mysite.domain.com. What
AM i want to do is : If people type in their browsers
AM mysite.domain.com redirect to mysite.com and if they type
AM mysite.com to display the page. I'm guessing it should be
AM something like this : if ( refferer = mysite.domain.com ) {
AM redirect to mysite.com } else { my html code }


http://www.devtek.org/snippets/index.php#domainRedirection

The only difference in your case is you don't need the second check,
and you'll just place your mysite.com HTML below the PHP.



Cheers,
Leif Gregory 

-- 
TB Lists Moderator (and fellow registered end-user)
PCWize Editor  /  ICQ 216395  /  PGP Key ID 0x7CD4926F
Web Site http://www.PCWize.com

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



[PHP] PHP Redirection If Login Fails.

2004-07-09 Thread Harlequin
Hi all I've created a page that allows registered users who have previously
registered and been entered into the database to login. However, for some
reason if a user login fails my code does not display the appropriate error
message.

Ideally I would like the users to be redirected to another page rather than
the login page if they fail but I need some help with the code.

Anyone...?

-- 
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-

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



[PHP] Re: PHP Redirection If Login Fails.

2004-07-09 Thread Harlequin
Here's the code in question: I'd ideally want the user to only be directed
to this page if login is successful. Directed to another page if
unsuccessful but even the error messages do not display which I find
strange...

/* Verify Login */
  $sql = SELECT UserFirstName,UserID,UserPassword,FurtherComments FROM
RegisteredMembers
 WHERE UserID='$_POST[TXT_UserID]';
  $result = mysql_query($sql) or die (could not select database);
  $num = mysql_num_rows($result);
  if ($num == 1) //Login Name Was Found
  {
   $sql = SELECT UserID FROM RegisteredMembers
  WHERE UserID='$_POST[TXT_UserID]'
AND UserPassword=('$_POST[TXT_UserPassword]');
   $result2 = mysql_query($sql) or die(Couldn't execute query #2. MySQL
Error:  . mysql_error());
   $num2 = mysql_num_rows($result2);
   if ($num2  0) // password is correct
   {
  $_SESSION['auth']=yes;
$logname=$_POST['TXT_UserID'];
$_SESSION['logname'] = $logname;
$today = date(Y-m-d h:m:s);
$sql = INSERT INTO Logon (loginName,loginTime)
VALUES ('$logname','$today');
mysql_query($sql) or die(Couldn't execute query. MySQL Error: 
. mysql_error());
  }
   else // password is not correct
   {
  unset($do);
$message=The Login Name, '$_POST[TXT_UserID]'
exists, but you have not entered the correct password! Please
try again.br;
   }
   }
   elseif ($num == 0) // login name not found
   {
unset($do);
   $message = The Login Name you entered does not exist! Please try
again.br;
  }

-- 
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-
Harlequin [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi all I've created a page that allows registered users who have
previously
 registered and been entered into the database to login. However, for some
 reason if a user login fails my code does not display the appropriate
error
 message.

 Ideally I would like the users to be redirected to another page rather
than
 the login page if they fail but I need some help with the code.

 Anyone...?

 -- 
 -
  Michael Mason
  Arras People
  www.arraspeople.co.uk
 -

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



Re: [PHP] Re: PHP Redirection If Login Fails.

2004-07-09 Thread Jason Wong
On Friday 09 July 2004 18:37, Harlequin wrote:
 Here's the code in question: I'd ideally want the user to only be directed
 to this page if login is successful. Directed to another page if
 unsuccessful but even the error messages do not display which I find
 strange...

[snip]

else // password is not correct
{
   unset($do);
 $message=The Login Name, '$_POST[TXT_UserID]'
 exists, but you have not entered the correct password! Please
 try again.br;

Do you actually print/echo $message elsewhere in your code? In the code you 
posted, I can only see it being assigned by not actually used.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
When the bosses talk about improving productivity, they are never talking
about themselves.
*/

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



Re: [PHP] Re: PHP Redirection If Login Fails.

2004-07-09 Thread Harlequin
Thanks Jason. I think that's where I was falling down with this one.



-- 
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-
Jason Wong [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On Friday 09 July 2004 18:37, Harlequin wrote:
  Here's the code in question: I'd ideally want the user to only be
directed
  to this page if login is successful. Directed to another page if
  unsuccessful but even the error messages do not display which I find
  strange...

 [snip]

 else // password is not correct
 {
unset($do);
  $message=The Login Name, '$_POST[TXT_UserID]'
  exists, but you have not entered the correct password!
Please
  try again.br;

 Do you actually print/echo $message elsewhere in your code? In the code
you
 posted, I can only see it being assigned by not actually used.

 -- 
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 --
 Search the list archives before you post
 http://marc.theaimsgroup.com/?l=php-general
 --
 /*
 When the bosses talk about improving productivity, they are never talking
 about themselves.
 */

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



Re: [PHP] redirection with PHP and closing windows?

2004-04-21 Thread -{ Rene Brehmer }-
According to historical records, on Tue, 20 Apr 2004 23:02:50 -0500 Andre
wrote about [PHP] redirection with PHP and closing windows?:

I want to be able to process a PHP script and then if successful redirect to
another page. Is there a good way to do this with PHP or do I need to stick
to Javascript?

I always use META redirects for this (trying to avoid anything but PHP
whatever it takes) ... but I believe there are other ways ...

Also, is it possible to close a window that is running a .PHP page via a
link or again, just stuck with Javascript?

I don't think it gets any simpler than the JavaScript:

// method 1
a href=javascript:window.close()Close window/a

// method 2
a href=# onClick=window.close()Close window/a

Not entirely sure how cross-browser compatible this is. May have to use
this.window.close() or windows.close(this) ... I can't remember the exact
syntax, sorry, haven't worked much with JavaScript except for mouseovers in
several years


Rene

-- 
Rene Brehmer
aka Metalbunny

~ If you don't like what I have to say ... don't read it ~

http://metalbunny.net/
References, tools, and other useful stuff...
Check out the new Metalbunny forums @ http://forums.metalbunny.net/

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



[PHP] redirection with PHP and closing windows?

2004-04-20 Thread Andre
I want to be able to process a PHP script and then if successful redirect to
another page. Is there a good way to do this with PHP or do I need to stick
to Javascript?

Also, is it possible to close a window that is running a .PHP page via a
link or again, just stuck with Javascript?

TIA!!
Andre


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



[PHP] Redirection to a named frame

2004-01-02 Thread Geoffrey Thompson
I was only able to find one reference to targeting a named frame on a
redirection, in the MySQL Cookbook by O'Reilly.  According to the book,
this should work:

 header('Window-target: main');
 header('Location: http://localhost/phase1/report.php');

But, alas, it seems to only load up the current frame (which is not main).

I also tried:

 header('Window-target: _top');
 header('Location: http://localhost/phase1/report.php');

to see if I could get it to wipe out the frameset and get back to the full
window, but it still loaded up in the current frame.

Any help would be appreciated!

Thanks,

Geoff

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



RE: [PHP] Redirection Question

2003-07-23 Thread Ow Mun Heng
Hi,

I'm not sure if this is going to help or not.. Since I understand
your issue only barely.. If I understand correctly, regardless of whether
the user comes from a.php, b.php or z.php, if they're not authenticated on
the system (via sessions or cookies) then the only place for them to go is
login.php. RIGHT???

Here's my 2 cents. (part of code I'm working on)


=login.php===
if ( check_if_authenticated() )   --- I have this fucntion located at the
top of a.php,b.php,c.php
{
header_refresh_html(home.php);  --- Function call - back to
Home.php if logged in
exit;
}
else--- display login form is not already logged in
{
top_html(); 
display_welcome_msg_html();
}
==

===html_functions.php ==
# ===
# This is where I print headers to redirect pages
# Default wait time is 2 seconds
# NOTE : WE MUST PRINT THE REDIRECTION BEFORE WE OUTPUT ANYTHING!
#Just put the redirection BEFORE the outputs!
# ===
function header_refresh_html($l_refresh_url) --- the page to redirect to is
given as an argument
{
// This is taken from php-manual
header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);
// Date in the past
header(Last-Modified:  . gmdate(D, d M Y H:i:s) .  GMT);  //
always modified
header(Cache-Control: no-store, no-cache, must-revalidate);   //
HTTP/1.1
header(Cache-Control: post-check=0, pre-check=0, false);
header(Pragma: no-cache);
// HTTP/1.0

header( Refresh:2;url=$l_refresh_url );   // Wait
default of 2 seconds
}

function header_redirect_html($l_redirect_url)
{
header( Location:$l_redirect_url);// Instant
Redirection
}

=




Cheers,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia 
DID : 03-7870 5168


-Original Message-
From: Beauford.2005 [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 8:55 AM
To: 'PHP'
Subject: RE: [PHP] Redirection Question


Thanks to all, I got it working - sort of. It works perfectly on
Windows, but will not work on Linux. I am using the same versions of
PHP, Apache and MySQL on both. I have asked this before and have been
told they are interchangeable, but more times than not I have to make a
bunch of changes to get it to work on Linux - and this is just another
example. I use Windows to do all the coding and design as it has all the
tools. Linux is just a bare bones box with no gui or tools. The php.ini
and httpd.conf are the same on both platforms (other than what is needed
for the specific platform). This makes it a real pain.

Oh well, back to my debugging.


-Original Message-
From: Curt Zirzow [mailto:[EMAIL PROTECTED] 
Sent: July 22, 2003 7:04 PM
To: PHP
Subject: Re: [PHP] Redirection Question


* Thus wrote Beauford.2005 ([EMAIL PROTECTED]):
 Maybe I didn't explain enough. What if they come from b.php or c.php. 
 How do I automatically log what page they tried to access. So hard 
 coding login.php?next=a.php would only work for one page.

Use the code that Grant Rutherford posted earlier, its the same concept
just a whole lot more flexible than mine. Not to mention a bit more
secured.

Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



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



RE: [PHP] Redirection Question

2003-07-22 Thread Beauford.2005
Nope. What if it's b.php, or c.php. They could come from many pages. I
wish it was that easy.

-Original Message-
From: Chris W. Parker [mailto:[EMAIL PROTECTED] 
Sent: July 22, 2003 4:02 PM
To: Beauford.2005
Subject: RE: [PHP] Redirection Question


Beauford.2005 mailto:[EMAIL PROTECTED]
on Wednesday, July 23, 2003 12:44 PM said:

 How would I automatically redirect them back to a.php after they have 
 logged in successfully.

header(Location: a.php);



chris.


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



Re: [PHP] Redirection Question

2003-07-22 Thread Kevin Stone
The other methods suggested avoid that entanglement.
Kevin

Beauford.2005 [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Maybe I didn't explain enough. What if they come from b.php or c.php.
 How do I automatically log what page they tried to access. So hard
 coding login.php?next=a.php would only work for one page.

 TIA

 -Original Message-
 From: Curt Zirzow [mailto:[EMAIL PROTECTED]
 Sent: July 22, 2003 4:16 PM
 To: PHP
 Subject: Re: [PHP] Redirection Question


 * Thus wrote Beauford.2005 ([EMAIL PROTECTED]):
  Hi,
 
  I am trying to figure out how to redirect a user back to a page but
  not having much luck.
 
  For example: I click on a menu item on my site which goes to a.php.
  This file includes another file that determines if they are logged in
  or not. If not, they are sent to login.php using header(:Location:
   ). How would I automatically redirect them back to a.php after
  they have logged in successfully. I have tried using HTTP_REFERRER,
  but it isn't redirecting.

 You can use the HTTP_REFERRER, but i wouldn't depend on it, it isn't a
 required header for the client.

 what you prolbably should do is when the arn't logged int, you can send
 them to something like:
  header('location: login.php?next=a.php');

 Then on your login form add a hidden variable:
 input type=hidden name=next value=?echo $_GET['next']?

 Finally when the user submits this form, and the user logs in
 successfully you know that you need to redirect them to the a.php.

 HTH,

 Curt
 --
 I used to think I was indecisive, but now I'm not so sure.

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




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



Re: [PHP] Redirection Question

2003-07-22 Thread Curt Zirzow
* Thus wrote Beauford.2005 ([EMAIL PROTECTED]):
 Maybe I didn't explain enough. What if they come from b.php or c.php.
 How do I automatically log what page they tried to access. So hard
 coding login.php?next=a.php would only work for one page.

Use the code that Grant Rutherford posted earlier, its the same concept
just a whole lot more flexible than mine. Not to mention a bit more
secured.

Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



RE: [PHP] Redirection Question

2003-07-22 Thread Beauford.2005
Maybe I didn't explain enough. What if they come from b.php or c.php.
How do I automatically log what page they tried to access. So hard
coding login.php?next=a.php would only work for one page.

TIA

-Original Message-
From: Curt Zirzow [mailto:[EMAIL PROTECTED] 
Sent: July 22, 2003 4:16 PM
To: PHP
Subject: Re: [PHP] Redirection Question


* Thus wrote Beauford.2005 ([EMAIL PROTECTED]):
 Hi,
 
 I am trying to figure out how to redirect a user back to a page but 
 not having much luck.
 
 For example: I click on a menu item on my site which goes to a.php. 
 This file includes another file that determines if they are logged in 
 or not. If not, they are sent to login.php using header(:Location: 
  ). How would I automatically redirect them back to a.php after 
 they have logged in successfully. I have tried using HTTP_REFERRER, 
 but it isn't redirecting.

You can use the HTTP_REFERRER, but i wouldn't depend on it, it isn't a
required header for the client.

what you prolbably should do is when the arn't logged int, you can send
them to something like:
 header('location: login.php?next=a.php');

Then on your login form add a hidden variable:
input type=hidden name=next value=?echo $_GET['next']?

Finally when the user submits this form, and the user logs in
successfully you know that you need to redirect them to the a.php.

HTH,

Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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


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



RE: [PHP] Redirection Question

2003-07-22 Thread Beauford.2005
Thanks to all, I got it working - sort of. It works perfectly on
Windows, but will not work on Linux. I am using the same versions of
PHP, Apache and MySQL on both. I have asked this before and have been
told they are interchangeable, but more times than not I have to make a
bunch of changes to get it to work on Linux - and this is just another
example. I use Windows to do all the coding and design as it has all the
tools. Linux is just a bare bones box with no gui or tools. The php.ini
and httpd.conf are the same on both platforms (other than what is needed
for the specific platform). This makes it a real pain.

Oh well, back to my debugging.


-Original Message-
From: Curt Zirzow [mailto:[EMAIL PROTECTED] 
Sent: July 22, 2003 7:04 PM
To: PHP
Subject: Re: [PHP] Redirection Question


* Thus wrote Beauford.2005 ([EMAIL PROTECTED]):
 Maybe I didn't explain enough. What if they come from b.php or c.php. 
 How do I automatically log what page they tried to access. So hard 
 coding login.php?next=a.php would only work for one page.

Use the code that Grant Rutherford posted earlier, its the same concept
just a whole lot more flexible than mine. Not to mention a bit more
secured.

Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



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



Re: [PHP] Redirection Question

2003-07-22 Thread John W. Holmes
Beauford.2005 wrote:
Hi,

I am trying to figure out how to redirect a user back to a page but not
having much luck. 

For example: I click on a menu item on my site which goes to a.php. This
file includes another file that determines if they are logged in or not.
If not, they are sent to login.php using header(:Location:  ). How
would I automatically redirect them back to a.php after they have logged
in successfully. I have tried using HTTP_REFERRER, but it isn't
redirecting.
Well, you know you're in a.php when you realize the log in is not valid. 
So save $_SERVER['PHP_SELF'] somewhere in the session or pass it along 
to the login page. After you re-validate the login, redirect back to the 
page that was saved in the session or URL. If no page was saved, then 
redirect to a default page.

Pick up the next copy of PHP|Architect, because I think I'm going to 
include a larger write up of this method as a tip. :)

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals  www.phparch.com





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


[PHP] Redirection Question

2003-07-22 Thread Beauford.2005
Hi,

I am trying to figure out how to redirect a user back to a page but not
having much luck. 

For example: I click on a menu item on my site which goes to a.php. This
file includes another file that determines if they are logged in or not.
If not, they are sent to login.php using header(:Location:  ). How
would I automatically redirect them back to a.php after they have logged
in successfully. I have tried using HTTP_REFERRER, but it isn't
redirecting.

Any help is appreciated.


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



Re: [PHP] Redirection Question

2003-07-22 Thread Grant Rutherford
Hello there,

I had the same problem, and to solve it I put the following code in my 
check login include file:

   // code to detect no login
   session_start();
   session_register('target');
   $_SESSION['target'] = http://; . $_SERVER['SERVER_NAME'] . 
$_SERVER['REQUEST_URI'];
   header(Location:  . $loginpage);

This stores the user's original destination into a session variable.  I 
then just have the login page check to see if target is set:

   // code to authenticate login
   session_start()
   if (!empty($_SESSION['target'])){
   $target = 'Location: ' . $_SESSION['target'];
   session_unregister('target');
   header($target);
   } // if
I hope this helps,
Grant
Beauford.2005 wrote:

Hi,

I am trying to figure out how to redirect a user back to a page but not
having much luck. 

For example: I click on a menu item on my site which goes to a.php. This
file includes another file that determines if they are logged in or not.
If not, they are sent to login.php using header(:Location:  ). How
would I automatically redirect them back to a.php after they have logged
in successfully. I have tried using HTTP_REFERRER, but it isn't
redirecting.
Any help is appreciated.

 



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


Re: [PHP] Redirection Question

2003-07-22 Thread Curt Zirzow
* Thus wrote Beauford.2005 ([EMAIL PROTECTED]):
 Hi,
 
 I am trying to figure out how to redirect a user back to a page but not
 having much luck. 
 
 For example: I click on a menu item on my site which goes to a.php. This
 file includes another file that determines if they are logged in or not.
 If not, they are sent to login.php using header(:Location:  ). How
 would I automatically redirect them back to a.php after they have logged
 in successfully. I have tried using HTTP_REFERRER, but it isn't
 redirecting.

You can use the HTTP_REFERRER, but i wouldn't depend on it, it isn't a
required header for the client.

what you prolbably should do is when the arn't logged int, you can send
them to something like:
 header('location: login.php?next=a.php');

Then on your login form add a hidden variable:
input type=hidden name=next value=?echo $_GET['next']?

Finally when the user submits this form, and the user logs in
successfully you know that you need to redirect them to the a.php.

HTH,

Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



Re: [PHP] Redirection Question

2003-07-22 Thread Ray Hunter
Use sessions or cookies to store the first page they are trying to
access. Then if not logged in redirect them to the login.php page. After
login is successful then they can be redirected to the values that was
specified in the cookie or seesion variable.

--
BigDog



On Wed, 2003-07-23 at 13:44, Beauford.2005 wrote:
 Hi,
 
 I am trying to figure out how to redirect a user back to a page but not
 having much luck. 
 
 For example: I click on a menu item on my site which goes to a.php. This
 file includes another file that determines if they are logged in or not.
 If not, they are sent to login.php using header(:Location:  ). How
 would I automatically redirect them back to a.php after they have logged
 in successfully. I have tried using HTTP_REFERRER, but it isn't
 redirecting.
 
 Any help is appreciated.
 


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



Re: [PHP] Redirection

2002-09-23 Thread -=| Julien Bonastre |=-

Yes that's right.. It's a standard HTTP/1.0 command I'm pretty sure so yeah.

Actually referring to the rfc docs it could date back to even eariler HTTP
standards too..

Hmm.. Yeah just don't send anything but header's and you can successfully
redir. with that header(Location: xxx); function..





--oOo---oOo--

 Julien Bonastre [The_RadiX]
 The-Spectrum Network CEO
 [EMAIL PROTECTED]
 www.the-spectrum.org

--oOo---oOo--

- Original Message -
From: Chris Shiflett [EMAIL PROTECTED]
To: Sascha Braun [EMAIL PROTECTED]
Cc: PHP Mailingliste [EMAIL PROTECTED]
Sent: Monday, September 23, 2002 10:22 AM
Subject: Re: [PHP] Redirection


 Sascha Braun wrote:

 I want to post a form and after parsing i want to redirect the user to
the home page.
 
 header() doesn't work in this circumstance, what can I do else?
 

 header() does work in this circumstance. In what way do you think it
 doesn't?

 header(Location: http://www.google.com/;);
 exit;

 Include that code after parsing, and your users will be redirected to
 Google's Web site. I'm not aware of any Web client that does not support
 this, regardless of how old or uncommon.

 Chris


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





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




[PHP] Redirection

2002-09-22 Thread Sascha Braun

Hi,

I want to post a form and after parsing i want to redirect the user to the home page.

header() doesn't work in this circumstance, what can I do else?

Greetings

Sascha



Re: [PHP] Redirection

2002-09-22 Thread Todd Pasley

I use

meta http-equiv=refresh content=DELAY;url=http://place.to.redirect.to

Todd.

- Original Message -
From: Sascha Braun [EMAIL PROTECTED]
To: PHP Mailingliste [EMAIL PROTECTED]
Sent: Monday, September 23, 2002 9:42 AM
Subject: [PHP] Redirection


Hi,

I want to post a form and after parsing i want to redirect the user to the
home page.

header() doesn't work in this circumstance, what can I do else?

Greetings

Sascha



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




Re: [PHP] Redirection

2002-09-22 Thread Justin French

Validate the input BEFORE outputting anything to the browser... this way you
have control over such problems.

?
// validate
// code
// here


if($valid)
{
header(...);
exit;
}
?
HTML
?
if(!$valid)
{
echo error on form;
}
?
/HTML

The code below exit; will only be executed if the input was NOT valid


Regards,

Justin




on 23/09/02 9:42 AM, Sascha Braun ([EMAIL PROTECTED]) wrote:

 Hi,
 
 I want to post a form and after parsing i want to redirect the user to the
 home page.
 
 header() doesn't work in this circumstance, what can I do else?
 
 Greetings
 
 Sascha
 


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




Re: [PHP] Redirection

2002-09-22 Thread Chris Shiflett

Sascha Braun wrote:

I want to post a form and after parsing i want to redirect the user to the home page.

header() doesn't work in this circumstance, what can I do else?


header() does work in this circumstance. In what way do you think it 
doesn't?

header(Location: http://www.google.com/;);
exit;

Include that code after parsing, and your users will be redirected to 
Google's Web site. I'm not aware of any Web client that does not support 
this, regardless of how old or uncommon.

Chris


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




Re: [PHP] Redirection

2002-09-22 Thread Sascha Cunz

And also avoid including scripts that contain a linebreak or a space after any 
'?'. When I did this first time, it took me ages to find out what was 
wrong... :-)

Sascha

Am Montag, 23. September 2002 02:07 schrieb Justin French:
 Validate the input BEFORE outputting anything to the browser... this way
 you have control over such problems.

 ?
 // validate
 // code
 // here


 if($valid)
 {
 header(...);
 exit;
 }
 ?
 HTML
 ?
 if(!$valid)
 {
 echo error on form;
 }
 ?
 /HTML

 The code below exit; will only be executed if the input was NOT valid


 Regards,

 Justin

 on 23/09/02 9:42 AM, Sascha Braun ([EMAIL PROTECTED]) wrote:
  Hi,
 
  I want to post a form and after parsing i want to redirect the user to
  the home page.
 
  header() doesn't work in this circumstance, what can I do else?
 
  Greetings
 
  Sascha


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




[PHP] redirection

2002-06-05 Thread Renaldo De Silva

is there any way other than

header(Location: http://www.php.net/;);

to redirect to another page.



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




Re: [PHP] redirection

2002-06-05 Thread Tyler Longren

I think that's pretty much your only option.  You could use javascript to
redirect if you wanted.

Tyler Longren
Captain Jack Communications
www.captainjack.com
[EMAIL PROTECTED]

- Original Message -
From: Renaldo De Silva [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 05, 2002 1:45 PM
Subject: [PHP] redirection


 is there any way other than

 header(Location: http://www.php.net/;);

 to redirect to another page.



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



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




RE: [PHP] redirection

2002-06-05 Thread Leotta, Natalie (NCI/IMS)

You can use JavaScript:

document.location=URL;

You can do that in an onClick (make sure that it's not a type submit, just a
type button if you're using a button).

-Natalie

-Original Message-
From: Renaldo De Silva [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, June 05, 2002 2:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP] redirection 


is there any way other than

header(Location: http://www.php.net/;);

to redirect to another page.



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

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




RE: [PHP] redirection

2002-06-05 Thread Ray Hunter

You can also set up redirects in your web server as well...


Thank you,

RAY HUNTER



-Original Message-
From: Renaldo De Silva [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 12:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP] redirection 


is there any way other than

header(Location: http://www.php.net/;);

to redirect to another page.



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



RE: [PHP] redirection

2002-06-05 Thread Martin Clifford

You can pretty much use ANY JavaScript event handler to accomplish the redirection.  
I'm new to PHP, so the header is the only place I know of to redirect.

onclick
onmouseup
onmousedown
onmouseover
onmousemove
onkeydown
onkeypress
onkeyup
onchange

etc.


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




RE: [PHP] redirection

2002-06-05 Thread Jay Blanchard

[snip]
I think that's pretty much your only option.  You could use javascript to
redirect if you wanted.
 is there any way other than

 header(Location: http://www.php.net/;);

 to redirect to another page.
[/snip]

Using the switch() function that I showed before here is what I have done...

login.php has the login form with an action of login1.php which is script
containing the case statement. It is just a script with no output until it
reaches its chosen header info.

HTH!

Jay



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




[PHP] redirection

2002-04-28 Thread Norman Zhang

Hi,

I want to set up a check that the page cannot be exacted by calling from
another page. E.g., members.php can only be excited if it called by
login.php.

So I set

if (eregi(members.php, $_SERVER['PHP_SELF'])) Header(Location,
login.php);

at the very top of members.php. But I am being redirected to login.php no
matter if members.php was called from login.php. What's proper way of
implementing this?

Regards,
Norman







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




Re: [PHP] redirection

2002-04-28 Thread Jason Wong

On Monday 29 April 2002 10:11, Norman Zhang wrote:
 Hi,

 I want to set up a check that the page cannot be exacted by calling from
 another page. E.g., members.php can only be excited if it called by
 login.php.

 So I set

 if (eregi(members.php, $_SERVER['PHP_SELF'])) Header(Location,
 login.php);

 at the very top of members.php. But I am being redirected to login.php no
 matter if members.php was called from login.php. What's proper way of
 implementing this?

In your code, assuming your regex is correct it matches *all* the time, thus 
no matter how you get to members.php, you'll be redirected to login.php.

And do you really only want to let people access members.php directly after 
visting login.php? How about if they login, go to the members page then go 
somewhere else on your site, then try to go back to the members page and they 
can't!

I would suggest that you use a more robust mechanism, such as sessions, for 
allowing/denying access to certain pages.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
To generalize is to be an idiot.
-- William Blake
*/

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




Re: [PHP] redirection

2002-04-28 Thread David Freeman

On 28 Apr 2002 at 19:11, Norman Zhang wrote:

 I want to set up a check that the page cannot be exacted by calling from
 another page. E.g., members.php can only be excited if it called by
 login.php.

If your login page does some sort of authentication and then either 
sets a cookie or a session variable or something you can check for 
that instead.  If there's no valid login (cookie, session, whatever) 
then redirect back to the login page.

CYA, Dave



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




Re: [PHP] redirection rather than include()

2002-02-01 Thread Graeme Bailey

G'day Martin,
I'm new to PHP too, and I'm working on the same sort of problem...

I had some success with something like this...
//-
?
//location index stored in variable $n
//print(brLocation chosen = Location $n); //debugging

switch($n){
   case 0: $location = http://www.xyz.com/;; break;
   case 1: $location = http://www.zzz.com/manual/mod/;; break;
   case 2: $location = http://abcd.com/manual/mod/mod_php4/;; break;
   case 3: $location = http://something.com/Linux_Root/index.html;; break;
   case 4: $location = http://www.hhh.com/manual/mod/mod_php4/;; break;
}
//$url = urlencode($location); //debugging
//print(brLocation chosen = $url); //debugging


header (Location: $location); /* Redirect browser
to another web site */
exit; /* Make sure that code below does
// not get executed when redirecting*/

?
//--
hope this helps
best regards
Graeme


On Fri,  1 Feb 2002 08:44, you wrote:
 use: { header(location: new_full_url_here); exit; }

 -Original Message-
 From: Benjamin deRuyter [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 01, 2002 9:42 AM
 To: PHP
 Subject: [PHP] redirection rather than include()


 This is a PHP newbie trying to figure something out.

 I am creating a web-app which begins with a login page and goes through the
 typical user/pass validation and upon success moves to a frameset where the
 application will run.  The action of the login form is act_login.php.  In
 that script I validate the user/pass and, upon validation, include() the
 frameset script.  However, I would rather redirect the browser to the
 frameset script.  In other words I want to progression to go like this...

 login form -- successful login (determined by act_login.php) -- redirect
 browser to app frameset

 This scenario is probably swimming in technicalities, and I'm probably just
 fine using the include() statement.  However, I guess my overall question
 is... is there a way to redirect the browser to a new URL (eg. php script)
 inside something as simple as an if/then statement?

 Thanks!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] redirection rather than include()

2002-01-31 Thread Benjamin deRuyter

This is a PHP newbie trying to figure something out.

I am creating a web-app which begins with a login page and goes through the
typical user/pass validation and upon success moves to a frameset where the
application will run.  The action of the login form is act_login.php.  In
that script I validate the user/pass and, upon validation, include() the
frameset script.  However, I would rather redirect the browser to the
frameset script.  In other words I want to progression to go like this...

login form -- successful login (determined by act_login.php) -- redirect
browser to app frameset

This scenario is probably swimming in technicalities, and I'm probably just
fine using the include() statement.  However, I guess my overall question
is... is there a way to redirect the browser to a new URL (eg. php script)
inside something as simple as an if/then statement?

Thanks!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] redirection rather than include()

2002-01-31 Thread Martin Towell

use: { header(location: new_full_url_here); exit; }

-Original Message-
From: Benjamin deRuyter [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 01, 2002 9:42 AM
To: PHP
Subject: [PHP] redirection rather than include()


This is a PHP newbie trying to figure something out.

I am creating a web-app which begins with a login page and goes through the
typical user/pass validation and upon success moves to a frameset where the
application will run.  The action of the login form is act_login.php.  In
that script I validate the user/pass and, upon validation, include() the
frameset script.  However, I would rather redirect the browser to the
frameset script.  In other words I want to progression to go like this...

login form -- successful login (determined by act_login.php) -- redirect
browser to app frameset

This scenario is probably swimming in technicalities, and I'm probably just
fine using the include() statement.  However, I guess my overall question
is... is there a way to redirect the browser to a new URL (eg. php script)
inside something as simple as an if/then statement?

Thanks!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



[PHP] Redirection and Passing Data (arrays)

2002-01-15 Thread m. ali


hi

may can some body help me

I'm writing a shopping cart system where the user can search for a product.
the search result is a page with number of items where the user can select
some them using checkboxes and enter the quantity that he needs, then add
them to his shopping cart this works fine when his logged in but when he is
not logged in, after the search and selecting the items when he comes to add
them to the shopping cart a login screen appears where he enters his login
user/password his shopping cart appears.

the problem is that the items that he selected in the result page are not
passed after his login so how can i pass these arrays of checkboxes and
textfields with the login script.

thanx for your help




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Redirection in PHP ? (newbie)

2001-05-14 Thread Nicolas Mermet

Hi, this might be a trivial question but I could not find any docs on that
on php.net.

I am develloping the admin side of a dynamic web site (php/mysql). 
The mechanic is nothing special: a form is submitted and sends the data to
the php page/script that actually does the work of feeding the db. I
noticed that hitting back on the browser make the feeding scripts run
again, and double the entries in the db. Of course, that is what the
scripts are supposed to do :-).

To avoid spamming my db I would like to implement a simple redirection
function, that would redirect the user to the main admin page once the
feeding script has successfully executed and would reduce chances of
double entries. Is there a simple way to achieve that ?

thanks,
Nicolas.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Redirection in PHP ? (newbie)

2001-05-14 Thread Chris Adams

On 14 May 2001 16:54:49 -0700, Nicolas Mermet [EMAIL PROTECTED]
wrote:
 To avoid spamming my db I would like to implement a simple redirection
 function, that would redirect the user to the main admin page once the
 feeding script has successfully executed and would reduce chances of
 double entries. Is there a simple way to achieve that ?

header(Location: index.php) should do the trick.

However, I'd recommend something more robust if avoiding duplicates is a big
deal. For example, if you're using sessions, you might have your addition
script set a confirmation variable using uniqid() and changing it after
updating the DB; if confirmation variable passed in the form submission doesn't
match the session variable, you can redirect them to the Were you really
sure? page. Alternately, depending on your data structure it might be easier
to simply insert a dummy record first and then use UPDATEs from that point
forward.

(The unique confirmation variable approach is also a good idea for security
purposes - otherwise if someone can guess the structure of your application,
they could do something funny like send an HTML email with a link to
/products/delete.php?ID=someIDConfirmed=yes to an admin, which would go
directly through without confirmation if they were logged in at the time.)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] redirection to another page function

2001-04-23 Thread James Holloway

One thing that doesn't seem to have been considered is the use of the
refresh meta tag.  Whilst it depends on whether or not the browser is
archaic (and let's face it, most people nowadays seem to be running at least
version 4 of either IE or Netscape), it's something that can't be turned off
(at least to my knowledge, I could be wrong) and workarounds can be supplied
for instances when the browser doesn't accept the tag.  This doesn't hinder
programming too much, as you don't have to worry about sending output after
headers, nor whether or not the browser has javascript enabled.

Personally, I prefer to use the header() function, and it's ages since I've
used this meta tag, though it's worth keeping in mind that old techniques
can still be useful ;)

META HTTP-EQUIV=Refresh CONTENT=1;url=page.php

James.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] redirection to another page function

2001-04-22 Thread Jason Murray

 Is there any PHP native function to redirect to another page or URL?

No, because you can only redirect a browser to another page using the 
appropriate HTTP command (it is a header) or JavaScript.

 I would like that once the user clicks on home.php4 and a few 
 verifications are done, he/she would be redirected to home.html.

You can issue a HTTP redirection command to the web browser by using 
PHP's Header() function. You'll want to use this kind of code:

?
   Header("Location:
http://this.is.the.destination.com/directory/file.php");
?

Jason

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] redirection to another page function

2001-04-22 Thread Christian Dechery

At 11:22 23/4/2001 +1000, Jason Murray wrote:
  Is there any PHP native function to redirect to another page or URL?

No, because you can only redirect a browser to another page using the
appropriate HTTP command (it is a header) or JavaScript.

  I would like that once the user clicks on home.php4 and a few
  verifications are done, he/she would be redirected to home.html.

You can issue a HTTP redirection command to the web browser by using
PHP's Header() function. You'll want to use this kind of code:

?
Header("Location:
http://this.is.the.destination.com/directory/file.php");
?

I never had any trouble using header() to redirect, but wouldn't something 
like this work even better (without worring about previous outputs)??

function redirect($dest)
{
 ?
 script language="JavaScript"
 parent.location.href='?=$dest?';
 /script
 ?
}

it would work wouldn't it?


. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] redirection to another page function

2001-04-22 Thread Christian Dechery

At 11:56 23/4/2001 +1000, you wrote:
  I never had any trouble using header() to redirect, but
  wouldn't something like this work even better (without
  worring about previous outputs)??
 
  function redirect($dest)
  {
   ?
   script language="JavaScript"
   parent.location.href='?=$dest?';
   /script
   ?
  }
 
  it would work wouldn't it?

In Netscape:

  Menu  Edit  Preferences  Advanced 
[ ] Enable Javascript
 ^
 Not ticked

Oops. I just broke that redirection. :)

Yeah... I know that... but, c'mon... a browser that doesn't support 
Javascript can't surf trough at least 30% of all websites... it's the 
absolute minority. Netscape itself is a minority.


. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] redirection to another page function

2001-04-22 Thread Jason Murray

 Yeah... I know that... but, c'mon... a browser that doesn't support 
 Javascript can't surf trough at least 30% of all websites... it's the 
 absolute minority. Netscape itself is a minority.

That's not the point. You should be writing the code such that you 
shouldn't need to make this kind of argument, at least for a simple
HTTP-related issue anyway. JavaScript syntax / functionality perhaps,
HTTP commands no.

Why do with JavaScript what you can do without?

Jason

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] redirection to another page function

2001-04-22 Thread Chris Aitken

At 11:15 PM 22/04/2001, Christian Dechery wrote:

Yeah... I know that... but, c'mon... a browser that doesn't support 
Javascript can't surf trough at least 30% of all websites... it's the 
absolute minority. Netscape itself is a minority.

While its true Netscape is a minority, and browsers not allowing Javascript 
are an even bigger minority (Bigger Minority. Military Intelligence 
Microsoft Works ?), I think Jasons point was more to show that its best to 
use an option which will work on all environments if possible. Sure, the 
Javascript system will work, but the header() function works better.

Surely its better to write your code trying not to exclude any user if at 
all possible.



Chris




--
   Chris Aitken - Webmaster/Database Designer - IDEAL Internet
email: [EMAIL PROTECTED]  phone: +61 2 4628   fax: +61 2 4628 8890
 

   Unix -- because a computer's a terrible thing to waste!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] redirection to another page function

2001-04-22 Thread Christian Dechery

At 12:22 23/4/2001 +1000, Chris Aitken wrote:
At 11:15 PM 22/04/2001, Christian Dechery wrote:

Yeah... I know that... but, c'mon... a browser that doesn't support 
Javascript can't surf trough at least 30% of all websites... it's the 
absolute minority. Netscape itself is a minority.

While its true Netscape is a minority, and browsers not allowing 
Javascript are an even bigger minority (Bigger Minority. Military 
Intelligence Microsoft Works ?), I think Jasons point was more to show 
that its best to use an option which will work on all environments if 
possible. Sure, the Javascript system will work, but the header() function 
works better.

Surely its better to write your code trying not to exclude any user if at 
all possible.

Yeah... I know what you and Jason mean.

I justed pointed out that it could work nicely... and I just tought of 
that... I user header("location: ... ") on all my scripts and struggle to 
put them before any output (that's not easy)...
I work on a e-commerce website (coding in ASP, but what can I do?) with 
lots of JavaScript calls that in some cases are the heart of the operation, 
and we never had any trouble or complaints with it.

I know that, the best way is to get your script running anywhere regardless 
of what browser or OS people use, but is important too to use as much of 
the technology as you can. Like HTML capable clients... in a recent pass, 
that was a nightmare cuz half the people used the most outdated email 
clients, but nowadays, almost every spam or corporate email I get, is HTML, 
people who don't have HTML capable clients, hurry to get them. I won't even 
get started with "noframesYour browser isn't frames capable/noframes", 
hehe. Javascipt is almost a standard and it is a great help in many cases 
where server-side simply won't do the job. I don't know... I'm just 
thinking here... maybe its all BS! :)

. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] redirection to another page function

2001-04-22 Thread Jason Murray

 I work on a e-commerce website (coding in ASP, but what can I 
 do?) with lots of JavaScript calls that in some cases are the heart 
 of the operation, and we never had any trouble or complaints with it.

I want your job. 

We have people complain every time we set a cookie. Imagine the
fuss we'd have if we required JavaScript for something. :)

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
"What'll Scorpy use wormhole technology for?"
'Faster pizza delivery.'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] redirection to another page function

2001-04-22 Thread Christian Dechery

At 12:42 23/4/2001 +1000, you wrote:
  I work on a e-commerce website (coding in ASP, but what can I
  do?) with lots of JavaScript calls that in some cases are the heart
  of the operation, and we never had any trouble or complaints with it.

I want your job.

I don't think u do. :) ASP sux. Win2K sux even worse, I was just working at 
home in huge PHP script that ended up haning the entire system because I 
remotely restarted WIN2K and crappy-old-IIS didn't get back. Can u imagine 
my ears tomorrow? :)) hehehehe


We have people complain every time we set a cookie. Imagine the
fuss we'd have if we required JavaScript for something. :)




. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] redirection to another page function

2001-04-22 Thread Christian Dechery

At 12:48 23/4/2001 +1000, Chris Aitken wrote:
At 11:40 PM 22/04/2001, you wrote:

I justed pointed out that it could work nicely... and I just tought of 
that... I user header("location: ... ") on all my scripts and struggle to 
put them before any output (that's not easy)...
I work on a e-commerce website (coding in ASP, but what can I do?) with 
lots of JavaScript calls that in some cases are the heart of the 
operation, and we never had any trouble or complaints with it.

While I do utilise some javascript niceties in some of my work, I usually 
only do it either when a) its an internal sytsem here at work and I know 
everyone has the same system/software/setup or b) where its only an 
enhancement and it wont affect the usability of the system if its not 
there. Ill always try and use PHP and server side solutions before 
resorting to client side solutions

that's a better way to think about it...

Altough... I still think that URL redirection should be something easier to 
do... as it is something very usefull and very basic, if u think in the 
concepts of WWW and surfing... going from one page to another is almost a 
primitive... u know where I'm getting at?


. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] redirection to another page function

2001-04-22 Thread Adam

use the javascript function, but also use as backup plan such as a link at
the bottom or even code at the top like this:
///

if (conditionals == true) {
header(location:home.html);
}

//

that way it will get through for most all browsers if not all browsers



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] redirection

2001-04-21 Thread Kishore
How to redirect to another page in php. Is there any inbuilt function
available for redirection.
If possible send with example.


Thanks

kishor



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


Re: [PHP] redirection

2001-04-21 Thread Jason Brooke
header("Location: http://your.dom/file"); 


- Original Message - 
From: "Kishore" [EMAIL PROTECTED]
To: "phpgeneral" [EMAIL PROTECTED]
Sent: Saturday, April 21, 2001 11:28 PM
Subject: [PHP] redirection


 How to redirect to another page in php. Is there any inbuilt function
 available for redirection.
 If possible send with example.
 
 
 Thanks
 
 kishor




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


Re: [PHP] redirection

2001-04-21 Thread KPortsmout

In a message dated 21/04/2001 15:31:36 GMT Daylight Time, [EMAIL PROTECTED] 
writes:

 How to redirect to another page in php. Is there any inbuilt function
 available for redirection.
 If possible send with example.
 
 
 Thanks
 
 kishor 


Use the Header call,for more info see www.php.net and search for Header()

Example

header ("Location: Http://www.domain.com/owner/index.php");

HTH
Ade

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




  1   2   >