Re: [PHP] redirection
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
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
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
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
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
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
[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
Re: [PHP] redirection
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
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]
Re: [PHP] redirection
header("Location: http://any.URL/you/need") NOTE: header must be sent prior to any output. Otherwise this won't work and a warning will be issued. -- 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 II
I got it! :-) ""Wade"" <[EMAIL PROTECTED]> wrote in message 9bsudp$g23$[EMAIL PROTECTED]">news:9bsudp$g23$[EMAIL PROTECTED]... > I am submitting a form to a PHP page. I would like to check the form > variables before I load the page, and redirect them to another page if they > variables are incorrect -- so they can fix them. > > Any ideas how I do this? > My idea was to start out the PHP with an if statement, and redirect in the > case something was wrong. But I'm really having a hard time finding a way to > do this. > > Thank you! > Wade > > > > -- > 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 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()
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]
Re: [PHP] redirection rather than include()
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 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("Location 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]
Re: [PHP] Redirection in PHP ? (newbie)
header("Location: page.phtml"); http://www.php.net/manual/en/function.header.php Ethan Schroeder - Original Message - From: "Nicolas Mermet" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 14, 2001 6:57 PM Subject: [PHP] Redirection in PHP ? (newbie) > 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] > -- 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)
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=someID&Confirmed=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
header ("Location: http://www.location.com/home.html"); > -Original Message- > From: Carlos Fernando Scheidecker Antunes [mailto:[EMAIL PROTECTED]] > Sent: Sunday, April 22, 2001 8:19 PM > To: PHP-GENERAL > Subject: [PHP] redirection to another page function > Importance: High > > > Hello all! > > Is there any PHP native function to redirect to another page or URL? > > 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. > > Thanks, > > C.F. > -- 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
> 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: 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
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) { ?> parent.location.href='=$dest?>'; 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
> 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) > { > ?> > > parent.location.href='=$dest?>'; > > } > > it would work wouldn't it? In Netscape: Menu >> Edit >> Preferences >> Advanced >> [ ] Enable Javascript ^ Not ticked Oops. I just broke that redirection. :) 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
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) > > { > > ?> > > > > parent.location.href='=$dest?>'; > > > > > } > > > > 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
> 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
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
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 "Your browser isn't frames capable", 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
> 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
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 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
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
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
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]
Re: [PHP] redirection to another page function
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 ;) 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]