Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
Doulos
Life Cycles Becoming CPU Cycles



Joined: Jun 06, 2005
Posts: 732

PostPosted: Sat Nov 26, 2005 3:27 pm Reply with quote

I didn't know if this was the place to ask this question but here it is.

What I want to do change my index.php file to do the same thing as a index.html to redirect ppl to my new site. Some folks apparently are using /index.php as part of their shortcut and when they call it an sql error message comes up.

I did set up [ Only registered users can see links on this board! Get registered or login! ]
to redirect to new site. But, I want to do the same thing with my index.php file for those who do not to just try using the URL without the /index.php


I don't know php so any help would be appreciated.
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sat Nov 26, 2005 3:40 pm Reply with quote

Add these 2 lines right after your <? in index.php

header("Location: [ Only registered users can see links on this board! Get registered or login! ]");
die();
 
View user's profile Send private message
Doulos







PostPosted: Sat Nov 26, 2005 5:07 pm Reply with quote

Awesome, Raven. That works. But, how do I delay the redirect like you do in html with this example:

<meta HTTP-EQUIV="Refresh" CONTENT="10; URL=http://clanfga.com/index.php">

What I want to do is display the new url and a pic/link and allow users time to write it down before redirecting them.
 
Raven







PostPosted: Sat Nov 26, 2005 5:20 pm Reply with quote

Try this:

header("Refresh: 10; [ Only registered users can see links on this board! Get registered or login! ]");
 
Doulos







PostPosted: Sat Nov 26, 2005 5:28 pm Reply with quote

Thanks Raven. Smile
 
Doulos







PostPosted: Sat Nov 26, 2005 6:29 pm Reply with quote

I want to add a picture that is linked to a url in case they don't want to wait 10 seconds but I can't figure it out. This is what I tried:

Code:
$content .= "<center><a href=\"http://www.clanfga.com/\" target=\"_blank\"><img src=\"images/fgabutton.jpg\" title=\"Clan FGA\"</a></center><br>";


but it doesn't work. I copied this from a block I use on my website. It works on the block but won't in index.php

EDIT:

Nevermind, I figured it out.

Code:
echo "<center><a href=\"http://www.clanfga.com/\" 


target=\"_blank\"><img src=\"http://www.clanfga.com/images/fgabutton.gif\" title=\"Clan FGA\"</a></center>";     


THANKS AGAIN.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©