PHP help for logout.php

Can anyone PLEASE assist with the following .

I want my members to be directed to different log out pages dependent on SEX .IE: FEMALE GOES TO page/logoutF

AND MALE goes to page/logoutM

 

So what is the BEST way of doing this ?

if (isset( $_COOKIE['memberID']) && isset($_COOKIE['memberPassword']))
    bx_logout();

$_page['name_index'] = 150;
$_page['css_name'] = '';

$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = MsgBox(_t('_Please Wait'));
$_page_cont[$_ni]['url_relocate'] = $site['url'] . 'page/Logout';

send_headers_page_changed();
PageCode();

?>

I know one of you php gurus has the answer :O)

 

Also is it possible to redirect to an outside url Example http://www.yoursire.com ?

 

Many thanks in advance ..

Quote · 10 May 2012

hmm!! actually you can only know someones gender if he is logged in right. As you can see bx_logout();

is called in very beginning and it logs the member out so you can't get his/her ID to do anything.

obviously some work around is needed here. 

so much to do....
Quote · 10 May 2012

give this a try...

ob_start();

require_once( 'inc/header.inc.php' );

require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );

require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' );

ob_end_clean();

 

$_page['name_index'] = 150;

$_page['css_name'] = '';

 

$iId = getLoggedId();

$aProfile = getProfileInfo($iId);

$sGender = $aProfileInfo['Sex'];

 

if($sGender = 'male'){

$msg = 'Yo poeple! I am Male';

$link = 'http://www.google.com';

}

elseif($sGender = 'female') {

$msg = 'Hello all, I am Female';

$link = 'http://www.google.com';

}

$_ni = $_page['name_index'];

$_page_cont[$_ni]['page_main_code'] = $msg;

$_page_cont[$_ni]['url_relocate'] = $link;

 

send_headers_page_changed();

PageCode();

 

if (isset( $_COOKIE['memberID']) && isset($_COOKIE['memberPassword']))

bx_logout();

?>

Change the code to show your messages and url. I hope you understand the above.

Good luck

so much to do....
Quote · 10 May 2012

Yes I do Understand !

You are a Genius :O) Thank you very much       The    bx_logout()  was what I was having a problem getting my head around !

Works like A dream .......

 

Once again Many Thanks

Quote · 10 May 2012

You're welcome....:)

so much to do....
Quote · 10 May 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.