Hi,
Could anyone please tell me how to go about linking some folders which are already in php to the login page. For example once you have logged in successfully, the next thing you want to see is the admin homepage. How do you link the login page to the admin page and then from the admin page to the student page etc. Please i would be greatful if anyone could provide the code. This is my code for both the checklogin.php and login_success.php

checklogin.php

<?php
ob_start();
$host="localhost"; // Host name
$username="root"; // Mysql username
$password="abby1"; // Mysql password
$db_name="test"; // Database name
$tbl_name="members"; // Table name

// Connect to server and select databse.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");

// Define $myusername and $mypassword
$myusername=$_POST;
$mypassword=$_POST;

$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'";
$result=mysql_query($sql);

// Mysql_num_row is counting table row
$count=mysql_num_rows($result);
// If result matched $myusername and $mypassword, table row must be 1 row

if($count==1){
// Register $myusername, $mypassword and redirect to file "login_success.php"
session_register("myusername");
session_register("mypassword");
header("location:login_success.php");
}
else {
echo "Wrong Username or Password";
}

ob_end_flush();
?>


login_success.php

<?
// Check if session is not registered , redirect back to main page.
// Put this code in first line of web page.
session_start();
if(!session_is_registered(myusername)){
header("location:main_login.php");
}
?>

<html>
<body>
Login Successful
</body>
</html>

Using menus ? If a user is valid, redirect him to the next page which has a menu to navigate to all the pages. You can use the same header function to redirect the user after successful login.

<?
// Check if session is not registered , redirect back to main page.
// Put this code in first line of web page.
session_start();
if(!session_is_registered(myusername)){
header("location:main_login.php");
} else {
header("location: adminpage.php");
}
?>

In adminpage.php, have a menu to navigate to other pages.

ok thank you i will try that. But what if what i want is in a folder which is C:\xampp\htdocs\webpaos\admin\index.php

how do i put it. do i put it like what i just put?

yep.
header("location: $url");
where $url can be
1. A url eg. $url="http://www.yahoo.com";
2. The screen where you want to redirect the user.
Eg. $url="path/to/admin/index.php";

ok i tried all that but it gave me this error

Parse error: syntax error, unexpected $end in C:\xampp\htdocs\webpaos\login_success.php on line 16

but i don't have a line 16 in the login_success.php. This is the code for login_success.php

<?
// Check if session is not registered , redirect back to main page.
// Put this code in first line of web page.
session_start();
if(!session_is_registered(myusername)){
header("location:main_login.php");
} else {
header("location:localhost/webpaos/admin/index.php")
?>

<html>
<body>
Login Successful
</body>
</html>

else {
header("location:localhost/webpaos/admin/index.php")

Missing } tag and semi-colon after header. :)

my goodness nav your at absolutley brillianttttttttttttttttt..AWESOMEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE..I LOVE YOU.

I have another question though but i will put it in another thread if you don't mind

Oh btw, you cant give localhost. You should give the relative path. For example, if your executing script is in webpaos and you want to redirect the user to admin/index.php, you can do it this way. header("location: ./admin/index.php");

Umm.. Did it solve your problem ? And yep! dont give the absolute path. If you host this site some day, you should search for localhost in your script and change it to the url. So, its better if you give relative path of the file.

Cheers,
Naveen

yes it solved my problem.. what of when i logout and then i want it to redirect back to the login page would this be right?

logout.php

<?
// Put this code in first line of web page.
session_start();
if(!session_is_registered(myusername)){
header("location:main_login.php");
}
session_destroy();
?>

Right. But you aren't unsetting the session variable. You should destroy the session first and then redirect ! Because, the user will be 'logged in' when he clicks on logout. So, it wouldn't enter the if condition. You can unset registered session variable first using session_unset and then redirect to the main page.

oh right..thanks.
Now i'm having a problem with another webpage which when i type in the url localhost/webpaos/tutors it gives me this

?>

I have checked all the php ending tags but i'm not sure of the problem. This is the code

index.php

<?php
/**
 *
 * INDEX - Tutor index
 *
 *
 *
 */

require_once("../include/inc_global.php");
require_once(DOC__ROOT . "lang/en/generic.php");
require_once(DOC__ROOT . "lang/en/tutors/tutors.php");

check_user($_user, 'staff');
// --------------------------------------------------------------------------------



// --------------------------------------------------------------------------------
// Begin Page

$UI->page_title = APP__NAME;
$UI->menu_selected = 'home';
$UI->breadcrumbs = array    (
    'home'          => null ,
);
$UI->head();
$UI->body();

$UI->content_start();
echo '<p>' . WELCOME . '</p>';
echo '<p>' . SECTIONS__INTRO . '</p>';
?>

<table class="option_list" style="width: 500px;">
<tr>
    <td><a href="forms/"><img src="../images/icons/form.gif" width="32" height="32" alt="<?php echo MY__FORMS; ?>" /></a></td>
    <td>
        <div class="option_list">
            <div class="option_list_title"><a class="hidden" href="forms/"><?php echo MY__FORMS; ?></a></div>
            <p><?php echo OPT__FORMS__DESC; ?></p>
        </div>
    </td>
</tr>
<tr>
    <td><a href="groups/"><img src="../images/icons/groups.gif" width="32" height="32" alt="<?php echo MY__GROUPS; ?>" /></a></td>
    <td>
        <div class="option_list">
            <div class="option_list_title"><a class="hidden" href="groups/"><?php echo MY__GROUPS; ?></a></div>
            <p><?php echo OPT__GROUPS__DESC; ?></p>
        </div>
    </td>
</tr>
<tr>
    <td><a href="assessments/"><img src="../images/icons/assessments.gif" width="32" height="32" alt="<?php echo MY__ASSESSMENTS; ?>" /></a></td>
    <td>
        <div class="option_list">
            <div class="option_list_title"><a class="hidden" href="assessments/"><?php echo MY__ASSESSMENTS; ?></a></div>
            <p><?php echo OPT__ASSESSMENTS__DESC ?></p>
        </div>
    </td>
</tr>
</table>

<h2><?php echo GETTING__STARTED__TITLE ; ?></h2>
<p><?php echo GETTING__STARTED__DESC ; ?></p>


<?php
$UI->content_end();
?>

inc_global.php

<?php
/**
 *

 *
 */

// Site Setup
error_reporting(0);

session_start();



// Turn off warning about possible session & globals compatibility problem
ini_set('session.bug_compat_warn', 0);



/*
 * Configuration
 */



//Application information


define('APP__NAME', 'Web-PA OS');


define('APP__TITLE', 'Web-PA OS : Online Peer Assessment System');


define('APP__WWW', 'http://localhost/webpaos');


define('APP__ID', 'webpa');


define('APP__VERSION', '1.0.0.0');


define('APP__DESCRIPTION','Web-PA, an  online peer assessment system.');


define('APP__KEYWORDS','peer assessment, online, peer, assessment, tools');



define('APP__MD5_SALT', 'PF46ALC9Z1');




//Database information
define('APP__DB_TYPE', 'MySQLDAO');



define('APP__DB_HOST', 'localhost:3306');

// If on a non-standard port, use this format:  <server>:<port>
define('APP__DB_USERNAME', 'root');


define('APP__DB_PASSWORD', 'annie');


define('APP__DB_DATABASE', 'pa');



define('APP__DB_PERSISTENT', false);


define('APP__DB_CLIENT_FLAGS', 2);



// Contact info
define('APP__EMAIL_INFO', 'dami2cuteforever@yahoo.com');


define('APP__EMAIL_HELP', 'dami2cuteforever@yahoo.com');


define('APP__EMAIL_TECH', 'dami2cuteforever@yahoo.com');



// Includes

define ('DOC__ROOT', 'c:/xampp/htdocs/webpaos');


require_once(DOC__ROOT.'/library/functions/lib_common.php');


require_once(DOC__ROOT.'/library/classes/class_dao.php');


require_once(DOC__ROOT.'/library/classes/class_user.php');


require_once(DOC__ROOT.'/library/classes/class_cookie.php');


require_once(DOC__ROOT.'/library/classes/class_engcis.php');


require_once(DOC__ROOT.'/include/classes/class_ui.php');



//define the authentication to be used
 define('AUTH__CLASS', 'DBAuthentication');

//LDAP Authentication is 'LDAPAuthenticator' and database authentication is 'DBAuthentication'


// Old config compatibility
$_config['app_id'] = APP__ID;

$_config['app_www'] = APP__WWW;




// Initialisation

// Magic quotes workaround
set_magic_quotes_runtime(0);



if (get_magic_quotes_gpc()) {
    function stripslashes_deep($value) {
        return is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value);

    }
//NW added in request as well
    $_COOKIE = array_map('stripslashes_deep', $_COOKIE);

    $_GET = array_map('stripslashes_deep', $_GET);

    $_POST = array_map('stripslashes_deep', $_POST);

    $_REQUEST = array_map('stripslashes_deep', $_REQUEST);

}

// Initialise DB object

$DB = new DAO( APP__DB_HOST, APP__DB_USERNAME, APP__DB_PASSWORD, APP__DB_DATABASE);

$DB->set_debug(true);


// Initialise The EngCIS Handler object

$CIS = new EngCIS();


// Initialise User Object

$_user = null;


// Initialise the cookie
$_cookie = new Cookie();


// Get info from the session
$_user_id = fetch_SESSION('_user_id', null);


// If there's no user in the session, but there is in the cookie, use that
if ( (!$_user_id) && ($_cookie->validate()) && (array_key_exists('user_id',$_cookie->vars)) ) {
    $_user_id = $_cookie->vars['user_id'];

}

// If we found a user to load, load 'em!
if ($_user_id){

    $_user_info = $CIS->get_user($_user_id);


    // Actually create the user object
    $_user = new User();

$_user->load_from_row($_user_info);

    $_user_info = null;
        // We're done with the data, so clear it

    // save session data
    $_SESSION['_user_id'] = $_user->id;


    // Save cookie data
    $_cookie->vars['user_id'] = $_user->id;


    $_cookie->save();

}

// Initialise UI Object

$UI = new UI($_user);


// Global Functions

/**
*   Check if the user is logged in and is a user of the given type
*   If not, it logs the user out
*   @param string $_user
*   @param string $user_type
*/
function check_user($_user, $user_type = null) {

    // Is the user valid?
    if ($_user) {

        // if we're not checking the user type, or we are checking and it matches, return OK
        if ( (!$user_type) || ($_user->type == $user_type) ) {
            return true;

    }
    }else{
        return false;

    }


    // If we didn't call 'return' then the user is denied access

    // If they tried to access the main index page, assume they haven't logged in and go to the login page directly
    if ($_SERVER['PHP_SELF']=='/index.php') {
        header('Location: '. APP__WWW .'/login.php');

    } else {    // log them out and give the DENIED message
        header('Location:'. APP__WWW .'/logout.php?msg=denied');

}
    exit;

}


/**
 * Function for the debug print out
 * @param string  $var
 */
function debug_print($var) {
    echo('<pre>');

    print_r($var);

echo('</pre>');

}


?>

generic.php

<?php
/**
 *
 * Short Description of the file
 *
 * Long Description of the file (if any)...
 *
 *
 */

 define ('MY__FORMS', 'my Forms');
 define ('MY__GROUPS', 'my groups');
 define ('MY__ASSESSMENTS', 'my assessments');

 define ('GROUPS', 'Groups');
 define ('NO__GROUPS','Number of Groups');
 define ('EDIT__GROUP', 'edit group');



 define ('ASSOCIATED__MODULES', 'Associated Modules');


 define ('EDIT_QUESTION','edit question');



 define('PLEASE__NOTE','<strong>Please Note</strong>');


 define('UNKNOWN__COLLECTION', 'Unknown Collection');
 define('EDDITING__UNKNOWN_GROUP','Editing: Unknown Group');
 define('EDDITING__GROUP','Editing group');

 //buttons
 define('BTN__LIST_GROUPS', 'List Groups');
 define('BTN__CREATE_GROUPS', 'Create Groups');
 define('BTN__CLONE_GROUPS', 'Clone Groups');

 define('BTN__SAVE_CHANGES', 'save changes');

 //errors
 define('FOLLOWING__FOUND', 'The following errors were found:');
 define('NO_CHANGES', 'No changes have been saved. Please check the details in the form, and try again.');
?>

tutors.php

<?php
/**
 *
 * Short Description of the file
 *
 * Long Description of the file (if any)...
 *
 *
 */

 //index page
 define('WELCOME' ,'Welcome to Web-PA, the easiest way for your students to carry out peer assessment reviews on the web. Using this system, students doing group work activities can mark each other\'s contributions, providing each student with an overall score.');
 define('SECTIONS__INTRO', 'Web-PA contains the following sections:');
 define('OPT__FORMS__DESC', 'Create peer assessment forms for your students to complete. You can re-use your forms with many different assessments.');
 define('OPT__GROUPS__DESC', 'Organise your students into groups. You can create new groups from scratch, or use existing groups that have been set up by other staff members.');
 define('OPT__ASSESSMENTS__DESC', 'Create, edit and schedule your peer assessments sessions so they only run how and when you want.');
 define('GETTING__STARTED__TITLE', 'Getting Started');
 define('GETTING__STARTED__DESC', 'The fastest way to get started is for you to choose <a href="forms/">my forms</a> from the left-hand menu, there you can begin creating a peer assessment form that your students will use later to grade each other.');

 //groups index page
 define('GROUPS__WELCOME', 'Here you can edit your groups, and organise how students are allocated to the individual groups.');
 define('GROUPS__TITLE', 'Existing Groups');
 define('NO__GROUPS__DESC', 'You have no groups. To add a collection use the <a href="create/">create new groups wizard</a>.');
 define('GROUPS__INSTRUCT__1','These are your groups. To view or edit a collection of groups, click on ');
 define('GROUPS__INSTRUCT__2','in the list below.');

 define('GROUPS__NOTE', 'Any changes you make to your groups here will <strong>not</strong> affect any assessments you may have created. If you want to change the groups in use with an assessment, you must edit the assessment and choose the option to select a new set of groups.');

 //groups edit index page
 define ('GROUPS__EDIT__DESC', 'Here you can edit your collections of groups, and organise how students are allocated to the individual groups.');
 define ('GROUPS__EDIT_TITLE', 'Group Collections');
 define ('NO_COLLECTIONS','You have no collections. To add a collection use the <a href="../create/">create new groups wizard</a>.');
 define ('GROUPS__EDIT__INST', 'These are your group collections. To view or edit a collection, click on its name in the list below:');

 //groups edit edit_group page
 define ('GROUPS__EDIT_SAVE_ERR', 'You must give this group a name.');

 define ('COLLECTION__LOCKED', '<p>This group belongs to a collection that has been locked, and cannot be edited. You can still view the details of this group, but not edited its name or members.</p>');

 define ('GROUPS__EDIT_INST', '<p>On this page you can change the name of this group, and add/remove students from it.</p>');
 define ('GROUP__SELECTED', '<p>The group you selected could not be loaded for some reason - please go back and try again.</p>');
?>

sorry for the long code

Could you please edit your post and put your code within [ /code] (without space) tags ? And, If you have access to php.ini file, change display_errors to On (if its off).[code=php ] [ /code] (without space) tags ?
And, If you have access to php.ini file, change display_errors to On (if its off).

Now i'm having a problem with another webpage which when i type in the url localhost/webpaos/tutors it gives me this
?>
I have checked all the php ending tags but i'm not sure of the problem. This is the code

index.php

<?php
/**
*
* INDEX - Tutor index
*/

require_once("../include/inc_global.php");
require_once(DOC__ROOT . "lang/en/generic.php");
require_once(DOC__ROOT . "lang/en/tutors/tutors.php");

check_user($_user, 'staff');
// --------------------------------------------------------------------------------

// --------------------------------------------------------------------------------
// Begin Page

$UI->page_title = APP__NAME;
$UI->menu_selected = 'home';
$UI->breadcrumbs = array (
'home' => null ,
);
$UI->head();
$UI->body();

$UI->content_start();
echo '<p>' . WELCOME . '</p>';
echo '<p>' . SECTIONS__INTRO . '</p>';
?>

<table class="option_list" style="width: 500px;">
<tr>
<td><a href="forms/"><img src="../images/icons/form.gif" width="32" height="32" alt="<?php echo MY__FORMS; ?>" /></a></td>
<td>
<div class="option_list">
<div class="option_list_title"><a class="hidden" href="forms/"><?php echo MY__FORMS; ?></a></div>
<p><?php echo OPT__FORMS__DESC; ?></p>
</div>
</td>
</tr>
<tr>
<td><a href="groups/"><img src="../images/icons/groups.gif" width="32" height="32" alt="<?php echo MY__GROUPS; ?>" /></a></td>
<td>
<div class="option_list">
<div class="option_list_title"><a class="hidden" href="groups/"><?php echo MY__GROUPS; ?></a></div>
<p><?php echo OPT__GROUPS__DESC; ?></p>
</div>
</td>
</tr>
<tr>
<td><a href="assessments/"><img src="../images/icons/assessments.gif" width="32" height="32" alt="<?php echo MY__ASSESSMENTS; ?>" /></a></td>
<td>
<div class="option_list">
<div class="option_list_title"><a class="hidden" href="assessments/"><?php echo MY__ASSESSMENTS; ?></a></div>
<p><?php echo OPT__ASSESSMENTS__DESC ?></p>
</div>
</td>
</tr>
</table>

<h2><?php echo GETTING__STARTED__TITLE ; ?></h2>
<p><?php echo GETTING__STARTED__DESC ; ?></p>


<?php
$UI->content_end();
?>

inc_global.php

<?php
/**
*
*/

// Site Setup
error_reporting(0);

session_start();

// Turn off warning about possible session & globals compatibility problem
ini_set('session.bug_compat_warn', 0);

/*
* Configuration
*/

//Application information


define('APP__NAME', 'Web-PA OS');
define('APP__TITLE', 'Web-PA OS : Online Peer Assessment System');
define('APP__WWW', 'http://localhost/webpaos');
define('APP__ID', 'webpa');
define('APP__VERSION', '1.0.0.0');
define('APP__DESCRIPTION','Web-PA, an online peer assessment system.');
define('APP__KEYWORDS','peer assessment, online, peer, assessment, tools');
define('APP__MD5_SALT', 'PF46ALC9Z1');

//Database information
define('APP__DB_TYPE', 'MySQLDAO');
define('APP__DB_HOST', 'localhost:3306');

// If on a non-standard port, use this format: <server>:<port>
define('APP__DB_USERNAME', 'root');
define('APP__DB_PASSWORD', 'annie');
define('APP__DB_DATABASE', 'pa');
define('APP__DB_PERSISTENT', false);
define('APP__DB_CLIENT_FLAGS', 2);

// Contact info
define('APP__EMAIL_INFO', 'dami2cuteforever@yahoo.com');
define('APP__EMAIL_HELP', 'dami2cuteforever@yahoo.com');
define('APP__EMAIL_TECH', 'dami2cuteforever@yahoo.com');

// Includes
define ('DOC__ROOT', 'c:/xampp/htdocs/webpaos');
require_once(DOC__ROOT.'/library/functions/lib_common.php');
require_once(DOC__ROOT.'/library/classes/class_dao.php');
require_once(DOC__ROOT.'/library/classes/class_user.php');
require_once(DOC__ROOT.'/library/classes/class_cookie.php');
require_once(DOC__ROOT.'/library/classes/class_engcis.php');
require_once(DOC__ROOT.'/include/classes/class_ui.php');

//define the authentication to be used
define('AUTH__CLASS', 'DBAuthentication');

//LDAP Authentication is 'LDAPAuthenticator' and database authentication is 'DBAuthentication'

// Old config compatibility
$_config['app_id'] = APP__ID;
$_config['app_www'] = APP__WWW;

// Initialisation

// Magic quotes workaround
set_magic_quotes_runtime(0);

if (get_magic_quotes_gpc()) {
function stripslashes_deep($value) {
return is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value);

}
//NW added in request as well
$_COOKIE = array_map('stripslashes_deep', $_COOKIE);
$_GET = array_map('stripslashes_deep', $_GET);
$_POST = array_map('stripslashes_deep', $_POST);
$_REQUEST = array_map('stripslashes_deep', $_REQUEST);

}

// Initialise DB object
$DB = new DAO( APP__DB_HOST, APP__DB_USERNAME, APP__DB_PASSWORD, APP__DB_DATABASE);
$DB->set_debug(true);

// Initialise The EngCIS Handler object
$CIS = new EngCIS();

// Initialise User Object
$_user = null;

// Initialise the cookie
$_cookie = new Cookie();

// Get info from the session
$_user_id = fetch_SESSION('_user_id', null);

// If there's no user in the session, but there is in the cookie, use that
if ( (!$_user_id) && ($_cookie->validate()) && (array_key_exists('user_id',$_cookie->vars)) ) {
$_user_id = $_cookie->vars['user_id'];

}

// If we found a user to load, load 'em!
if ($_user_id){
$_user_info = $CIS->get_user($_user_id);

// Actually create the user object
$_user = new User();
$_user->load_from_row($_user_info);
$_user_info = null;
// We're done with the data, so clear it

// save session data
$_SESSION['_user_id'] = $_user->id;

// Save cookie data
$_cookie->vars['user_id'] = $_user->id;
$_cookie->save();

}

// Initialise UI Object
$UI = new UI($_user);

// Global Functions

/**
* Check if the user is logged in and is a user of the given type
* If not, it logs the user out
* @param string $_user
* @param string $user_type
*/
function check_user($_user, $user_type = null) {

// Is the user valid?
if ($_user) {

// if we're not checking the user type, or we are checking and it matches, return OK
if ( (!$user_type) || ($_user->type == $user_type) ) {
return true;

}
}else{
return false;

}

// If we didn't call 'return' then the user is denied access

// If they tried to access the main index page, assume they haven't logged in and go to the login page directly
if ($_SERVER['PHP_SELF']=='/index.php') {
header('Location: '. APP__WWW .'/login.php');

} else { // log them out and give the DENIED message
header('Location:'. APP__WWW .'/logout.php?msg=denied');

}
exit;

}

/**
* Function for the debug print out
* @param string $var
*/
function debug_print($var) {
echo('<pre>');

print_r($var);

echo('</pre>');

}

?>

generic.php

<?php
/**
*
* Short Description of the file
* Long Description of the file (if any)...
*
*/

define ('MY__FORMS', 'my Forms');
define ('MY__GROUPS', 'my groups');
define ('MY__ASSESSMENTS', 'my assessments');
define ('GROUPS', 'Groups');
define ('NO__GROUPS','Number of Groups');
define ('EDIT__GROUP', 'edit group');
define ('ASSOCIATED__MODULES', 'Associated Modules');
define ('EDIT_QUESTION','edit question');
define('PLEASE__NOTE','<strong>Please Note</strong>');
define('UNKNOWN__COLLECTION', 'Unknown Collection');
define('EDDITING__UNKNOWN_GROUP','Editing: Unknown Group');
define('EDDITING__GROUP','Editing group');

//buttons
define('BTN__LIST_GROUPS', 'List Groups');
define('BTN__CREATE_GROUPS', 'Create Groups');
define('BTN__CLONE_GROUPS', 'Clone Groups');
define('BTN__SAVE_CHANGES', 'save changes');

//errors
define('FOLLOWING__FOUND', 'The following errors were found:');
define('NO_CHANGES', 'No changes have been saved. Please check the details in the form, and try again.');
?>

tutors.php

<?php
/**
*
* Short Description of the file
*
* Long Description of the file (if any)...
*/

//index page
define('WELCOME' ,'Welcome to Web-PA, the easiest way for your students to carry out peer assessment reviews on the web. Using this system, students doing group work activities can mark each other\'s contributions, providing each student with an overall score.');
define('SECTIONS__INTRO', 'Web-PA contains the following sections:');
define('OPT__FORMS__DESC', 'Create peer assessment forms for your students to complete. You can re-use your forms with many different assessments.');
define('OPT__GROUPS__DESC', 'Organise your students into groups. You can create new groups from scratch, or use existing groups that have been set up by other staff members.');
define('OPT__ASSESSMENTS__DESC', 'Create, edit and schedule your peer assessments sessions so they only run how and when you want.');
define('GETTING__STARTED__TITLE', 'Getting Started');
define('GETTING__STARTED__DESC', 'The fastest way to get started is for you to choose <a href="forms/">my forms</a> from the left-hand menu, there you can begin creating a peer assessment form that your students will use later to grade each other.');

//groups index page
define('GROUPS__WELCOME', 'Here you can edit your groups, and organise how students are allocated to the individual groups.');
define('GROUPS__TITLE', 'Existing Groups');
define('NO__GROUPS__DESC', 'You have no groups. To add a collection use the <a href="create/">create new groups wizard</a>.');
define('GROUPS__INSTRUCT__1','These are your groups. To view or edit a collection of groups, click on ');
define('GROUPS__INSTRUCT__2','in the list below.');
define('GROUPS__NOTE', 'Any changes you make to your groups here will <strong>not</strong> affect any assessments you may have created. If you want to change the groups in use with an assessment, you must edit the assessment and choose the option to select a new set of groups.');

//groups edit index page
define ('GROUPS__EDIT__DESC', 'Here you can edit your collections of groups, and organise how students are allocated to the individual groups.');
define ('GROUPS__EDIT_TITLE', 'Group Collections');
define ('NO_COLLECTIONS','You have no collections. To add a collection use the <a href="../create/">create new groups wizard</a>.');
define ('GROUPS__EDIT__INST', 'These are your group collections. To view or edit a collection, click on its name in the list below:');

//groups edit edit_group page
define ('GROUPS__EDIT_SAVE_ERR', 'You must give this group a name.');
define ('COLLECTION__LOCKED', '<p>This group belongs to a collection that has been locked, and cannot be edited. You can still view the details of this group, but not edited its name or members.</p>');
define ('GROUPS__EDIT_INST', '<p>On this page you can change the name of this group, and add/remove students from it.</p>');
define ('GROUP__SELECTED', '<p>The group you selected could not be loaded for some reason - please go back and try again.</p>');
?>

thank you

Since you are including so many files and most of them contains classes and we don't know what those classes do, I suggest you to echo your own message to check the flow of the code. For example, when calling a method in a class, check if it returns a value. Understand the flow of your script. Turn on display errors and set error reporting to 8191 or uncomment > error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT < in php.ini .

ok i'll try that now..thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.