Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 13th, 2003, 12:35 AM
Authorized User
 
Join Date: Jun 2003
Location: , , Germany.
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default Redirection

On topic ends, another starts :)

I'm playing around with http://www.phpbb.org for my (future) site.

No easy stuff, though!

Now, how can I implement a simple redirection to some other script. In that forum software they make use of meta redirection, but I believe there must be somethings like
Response.Redirect(url)



Cheers,
Frank
__________________
-----------------------
--Frank
http://www.insidesql.de
-----------------------
Reply With Quote
  #2 (permalink)  
Old June 13th, 2003, 04:26 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Wien, Wien, Austria.
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to NotNowJohn
Default

header("Location: http://www.url_for_redirect.com/");

Make sure that you have not sent any output to the browser before
calling a heder function.

Regs,
NotNowJohn

...but the Soon is eclipsed by the Moon
Reply With Quote
  #3 (permalink)  
Old June 13th, 2003, 04:31 AM
Authorized User
 
Join Date: Jun 2003
Location: , , Germany.
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default

simple as that, although I saw it, I didn't realise that is seems to be a builtin function.

Thanks again!

Cheers,
Frank
Reply With Quote
  #4 (permalink)  
Old June 15th, 2003, 06:19 AM
Dai Dai is offline
Authorized User
 
Join Date: Jun 2003
Location: Swansea, west glamorgan, United Kingdom.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What do you do if you want to automatically redirect to another page after an if statement. Do yu use meterefresh or is there some php code to deal with this?


What ever makes life easy
Reply With Quote
  #5 (permalink)  
Old June 19th, 2003, 02:24 PM
Friend of Wrox
Points: 2,570, Level: 21
Points: 2,570, Level: 21 Points: 2,570, Level: 21 Points: 2,570, Level: 21
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: San Diego, CA, USA
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by Dai
 What do you do if you want to automatically redirect to another page after an if statement. Do yu use meterefresh or is there some php code to deal with this?
Well, if you want to do it via Javascript or with an HTML meta refresh tag, you should only output that code if your conditions are met within PHP.

example:

<?php

if( some condition )
{
   echo "<meta http-equiv=\"refresh\" content=\"5\" />\n";
}
// else don't generate refresh code.

...
?>


Simple as that.


Take care,

Nik
http://www.bigaction.org/
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
URL Redirection santhosh.irtt Apache Tomcat 1 July 1st, 2006 08:07 PM
Redirection andyw ASP.NET 2.0 Basics 2 May 29th, 2006 05:23 PM
Download and Redirection wolverine4277 PHP How-To 5 December 23rd, 2004 05:32 PM
Redirection in webservice suparba .NET Web Services 3 October 27th, 2004 01:15 PM
automatic 'redirection' stu9820 Flash (all versions) 4 September 20th, 2004 07:29 AM



All times are GMT -4. The time now is 09:08 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.