GIDForums  

Go Back   GIDForums > Webmaster Forums > Web Design Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 17-Jul-2003, 17:30
jrobbio's Avatar
jrobbio jrobbio is offline
Regular Member
 
Join Date: Jan 2003
Location: Loughborough, England
Posts: 840
jrobbio will become famous soon enough

Answer to - How can I redirect a page with PHP?


I found this here and found it very useful: http://faq.ozoneasylum.com/497

I needed a redirect because of some work that I had done and I was basically having a nightmare with html not obeying the redirect command to a long syntaxed PHP page. So here is a PHP redirect that may help you out of a pickle

PHP Code:

<?php
header("Refresh: 3; URL=/index.phpnn");
echo " "; // NN4 requires that we output something...
exit();
?>



If you didn't want a timed redirect then you could use this:


header("Location: ADDRESS");
  #2  
Old 18-Jul-2003, 00:38
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
http://www.desilva.biz/php/phprefresh.html

Keep this up and I may have to add a new forum: Stuff that jrobbio found on the Net that could also be found here
  #3  
Old 18-Jul-2003, 04:54
jrobbio's Avatar
jrobbio jrobbio is offline
Regular Member
 
Join Date: Jan 2003
Location: Loughborough, England
Posts: 840
jrobbio will become famous soon enough
I'd love to be able to search your pages other than the forum as I'm sure I'd find the stuff I'd need.

I seriously can't find the thing I want when I need it.

Rob
  #4  
Old 18-Jul-2003, 04:57
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
No problems Rob - I was just kidding. I appreciate all your 'finds' off the Net. I am not much of a surfer myself; so you help me get to some sites that I may have never found on my own.
  #5  
Old 18-Jul-2003, 05:06
jrobbio's Avatar
jrobbio jrobbio is offline
Regular Member
 
Join Date: Jan 2003
Location: Loughborough, England
Posts: 840
jrobbio will become famous soon enough
What can I say, I surf too much sometimes.

Rob
  #6  
Old 27-Apr-2004, 19:52
tawhitley tawhitley is offline
New Member
 
Join Date: Apr 2004
Location: Atlanta, GA
Posts: 2
tawhitley is on a distinguished road
Question

Why does this not work?


I get an error when I try to put

<?php

// refresh / re-direct without delay
// ---------------------------------
header( 'location:http://www.desilva.biz/webdsn/' );

?>

inside a larger php script. It says something like it can't modify the header because a "required" file has already started modifying the header. I don't have the exact error right now.

All I want to do is reload my index.php file automatically after a database update, etc.

Thanks.
  #7  
Old 09-May-2004, 08:36
X-Man X-Man is offline
New Member
 
Join Date: May 2004
Location: Kingdom of Bahrain
Posts: 4
X-Man is on a distinguished road
HI


<html dir="rtl">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<script>
<!--
top.location.href="http://www.sitranet.net/vb/";
//--
</script>
</head>

<body>

</body>

</html>
 
 

Recent GIDBlogLast Week of IA Training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP script to show last referrer url and top referrer to your site jrobbio MySQL / PHP Forum 6 22-May-2006 01:06
Optimizing your web server with Turck MMCache for PHP JdS Web Hosting Forum 2 07-Jan-2004 07:48
[script] E-mail webmaster error page BobbyDouglas PHP Code Library 0 19-Aug-2003 20:10
[script] Password Protect web pages/site using PHP and MySQL JdS PHP Code Library 0 23-Jul-2003 10:02
All the big PHP script collections that matter jrobbio MySQL / PHP Forum 5 06-Jun-2003 16:14

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 22:06.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.