Current location: Hot Scripts Forums » Programming Languages » PHP » wont include?


wont include?

Reply
  #1 (permalink)  
Old 11-28-06, 05:02 AM
txt3rob txt3rob is offline
Newbie Coder
 
Join Date: Sep 2006
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
wont include?

PHP Code:

<?php



require_once "../ipbsdk_class.inc.php";
$SDK =& new IPBSDK();
global 
$SDK;

if (
$SDK->is_loggedin()) {
    
// Get Info
    
$memberinfo $SDK->get_advinfo();
    
// Alter Group Numbers To Which Groups You Want To Allow To See The Page
    
if ($SDK->is_ingroup(array("4" "12" "6")))
    {
        
// Add PHP code To Display to Promoters    
        
include ('mainindex.php');
    }
    else
    {
        
// Show Not Allowed Page
         
include('denied.html');   } 
}

?>
why if im logged in will the mainindex display but when im not a blank page appears when denied.html should be called in?
__________________
N00b Coder! One of those guys who collects bits of code and puts them together and carnt really code for himself
Reply With Quote
  #2 (permalink)  
Old 11-28-06, 05:10 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
Maybe you meant to do this?
PHP Code:

if ($SDK->is_loggedin()) {

    
// Get Info
    
$memberinfo $SDK->get_advinfo();
    
// Alter Group Numbers To Which Groups You Want To Allow To See The Page
    
if ($SDK->is_ingroup(array("4" "12" "6")))
    {
        
// Add PHP code To Display to Promoters    
        
include ('mainindex.php');
    }
}
else
{
    
// Show Not Allowed Page
     
include('denied.html');   } 

denied.html was only included if you're logged in, and if you are in a specific usergroup.
Reply With Quote
  #3 (permalink)  
Old 11-28-06, 05:18 AM
txt3rob txt3rob is offline
Newbie Coder
 
Join Date: Sep 2006
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
can you just point out where i was going wrong please?
im finiding it hard to spot
also thank you very much it has worked the last } wasnt required.
thank you!
__________________
N00b Coder! One of those guys who collects bits of code and puts them together and carnt really code for himself
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Including a File but cant use the include tag Dainbramaged05 PHP 4 10-10-05 07:00 AM
Page dependent include - how? CutAndPaste PHP 9 08-27-05 04:20 PM
PHP help... Orchidsdance PHP 8 09-25-04 07:58 PM
Random PHP include brduran PHP 4 08-16-04 06:34 AM
Disable form fields to be submitted RickyRod JavaScript 2 05-24-04 10:15 AM


All times are GMT -5. The time now is 05:45 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.