PHP Applications
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Applications

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old February 7th, 2007, 10:11 AM
_giles_ _giles_ is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 19 _giles_ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 40 sec
Reputation Power: 0
IF and page redirection

Hi,

I’m not sure if i’m just getting myself confused here! I want to build a simple redirection along the lines of :

<?php
require_once "siteDefaultsPage.inc";

if (!INTERACTION_TEST){
// redirect to new URL
}
?>

in order to control access to a page. I’m getting caught up with the headders being sent from the .inc file - however, I need the .inc file to set the variable INTERACTION_TEST. Can you help?

Reply With Quote
  #2  
Old March 19th, 2007, 06:06 PM
westmatrix99's Avatar
westmatrix99 westmatrix99 is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 288 westmatrix99 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 51 m 47 sec
Reputation Power: 2
RE: IF and page redirection

Cool can try to help;
Post the error(s) and the code that resides to that error.

Cheers
West

Reply With Quote
  #3  
Old March 19th, 2007, 06:11 PM
vg vg is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Fortaleza, CE, Brazil
Posts: 88 vg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 29 sec
Reputation Power: 2
RE: IF and page redirection

If INTERACTION_TEST is a variable, then it must be preceded by a $. Maybe that's the error.
php Code:
Original - php Code
  1.  
  2. require_once "siteDefaultsPage.inc";
  3.  
  4. if (!$INTERACTION_TEST){
  5. // redirect to new URL
  6. }

Reply With Quote
  #4  
Old March 19th, 2007, 06:13 PM
decodephp decodephp is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 80 decodephp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 1 m 33 sec
Reputation Power: 2
RE: IF and page redirection

<?php
ob_start();
require_once "siteDefaultsPage.inc";
......

Reply With Quote
  #5  
Old March 19th, 2007, 06:13 PM
westmatrix99's Avatar
westmatrix99 westmatrix99 is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 288 westmatrix99 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 51 m 47 sec
Reputation Power: 2
RE: IF and page redirection

I like the way you think Victor;

Cheers
West

Reply With Quote
  #6  
Old March 19th, 2007, 06:13 PM
decodephp decodephp is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 80 decodephp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 1 m 33 sec
Reputation Power: 2
RE: IF and page redirection

that article might be helpful as well in understand header already sent errors.

http://www.decodephp.com/2007/02/25/php-the-headers-already-sent-error-a-brief-look-at-headers/

Reply With Quote
  #7  
Old March 19th, 2007, 06:15 PM
westmatrix99's Avatar
westmatrix99 westmatrix99 is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 288 westmatrix99 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 51 m 47 sec
Reputation Power: 2
RE: RE: IF and page redirection

Code:
<?php
ob_start();
require_once "siteDefaultsPage.inc";
......


I just have to ask where did you get that info from decodephp?
I am lost maybe I need to play a game or something.

Cheers
West

Reply With Quote
  #8  
Old March 19th, 2007, 06:16 PM
decodephp decodephp is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 80 decodephp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 1 m 33 sec
Reputation Power: 2
RE: IF and page redirection

what info? the ob_start(); thing?

Reply With Quote
  #9  
Old March 19th, 2007, 06:19 PM
westmatrix99's Avatar
westmatrix99 westmatrix99 is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 288 westmatrix99 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 51 m 47 sec
Reputation Power: 2
RE: IF and page redirection

Yes but forget it I wasn't reading properly, sorry!

Cheers
West

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Applications > IF and page redirection


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway