Previous Thread
Next Thread
Print Thread
Hop To
#40188 03/30/2004 1:14 PM
Joined: Jun 2006
Posts: 73
C
journeyman
journeyman
C Offline
Joined: Jun 2006
Posts: 73
This is somewhat off-topic, but I'm sure one of the PHP gurus can help.

I'm setting up an April Fool's joke on one of my sites. I need all visitors to be redirected to my April Fool's page UNLESS they've already been there. I will set a cookie once they land on my special page to track that they've already seen it.

I need to insert some PHP code into the Generic Header of my board to check for the cookie and redirect the visitor if it's NOT present. I don't know much about PHP, so any help would be greatly appreciated.

#40189 03/31/2004 9:34 AM
Joined: Jun 2006
Posts: 73
C
journeyman
journeyman
C Offline
Joined: Jun 2006
Posts: 73
The following code is working perfectly when it's accessed on it's own. Should I expect any header problems or anything when I insert this into the Generic Header of my board?

Code
<?php 
if (!isset($myTestCookie)) { 
header("location:http://www.mydomain.com/aprilfools/"); 
 exit; 
} 
?>

#40190 03/31/2004 11:09 AM
Joined: Jun 2006
Posts: 346
J
enthusiast
enthusiast
J Offline
Joined: Jun 2006
Posts: 346
This forum is for answering questions about the ubb.threads software. <img src="https://www.ubbcentral.com/boards/images/graemlins/wink.gif" alt="" /> You'd have better success with your question over at www.threadsdev.com <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />


--
Website Development and Management
www.jcswebdev.com

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Are any of these legitmate?
by Baldeagle - 09/06/2026 1:37 PM
8.0.1 Patch Changelog Discussion
by isaac - 11/26/2025 1:34 PM
Upgraded to ver8 - now can't login
by phoenix011235 - 10/24/2024 8:50 AM
Who's Online Now
1 members (vscope), 384 guests, and 137 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)