Members

[insert_php]

if(!isset($_SESSION)){session_start();}
$hostname = “mysql1005.mochahost.com”;
$database = “fosco1_foscopa”;
$username = “fosco1_wp527”;
$password = “S82..2qi9p”;
$connStr = ‘mysql:host=mysql1005.mochahost.com;dbname=fosco1_foscopa’;
$user = ‘fosco1_wp527’;
$pass = ‘S82..2qi9p’;
//set_exception_handler(‘exceptionHandler’);
try
{
$conn = new PDO($connStr, $user, $pass);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch(PDOException $e)
{
showError(“Sorry, an error has occurred. Please try your request
later\n” . $e->getMessage());
}

if (isset($_SESSION[‘mid’])){

if (isset($_SESSION[‘mid’])) {$mid=$_SESSION[‘mid’];}
// Issue the query

$members = $conn->query(“SELECT members.f_mid, members.f_address, members.f_city, members.f_country, members.f_email, members.f_place_of_work, members.f_surname, members.f_year_group, members.f_title, members.f_othername, members.f_sex, members.f_photo, members.f_phone_mobile, members.f_phone_work, members.f_occupation FROM members where members.f_mid=’$mid'”);
$members->setFetchMode(PDO::FETCH_ASSOC);
$rmember=$members->fetch();

$users =$conn->query(“SELECT loggers.lid FROM loggers where loggers.f_mid=’$mid'”);
$users->setFetchMode(PDO::FETCH_ASSOC);
$euser=$users->fetch();
}
if(isset($_GET[‘member’])) {

$member = $conn->query(“SELECT members.f_mid, members.f_address, members.f_city, members.f_country, members.f_email, members.f_place_of_work, members.f_surname, members.f_year_group, members.f_title, members.f_othername, members.f_sex, members.f_photo, members.f_phone_mobile, members.f_phone_work, members.f_occupation FROM members where members.f_mid='”.$_GET[‘member’].”‘”);
$member->setFetchMode(PDO::FETCH_ASSOC);
$rmembers=$member->fetch();

}

echo ‘

Member Details

‘. $rmember[‘f_title’].’ ‘.$rmember[‘f_othername’]. ‘ ‘. $rmember[‘f_surname’] .’

‘. $rmember[‘f_occupation’] .’

‘. $rmember[‘f_place_of_work’] .’

‘. $rmember[‘f_address’] .’
‘.
$rmember[‘f_city’] .’
‘.
$rmember[‘f_country’] .’

‘. $rmember[‘f_email’] .’

‘. $rmember[‘f_phone_mobile’] .’


‘. $rmember[‘f_year_group’] .’

Group

‘. $rmember[‘f_phone_work’] .’

Phone – Work

Search

 

‘;
if (isset($_GET[‘member’])) {
echo ‘

‘. $rmembers[‘f_title’].’ ‘.$rmembers[‘f_othername’]. ‘ ‘. $rmembers[‘f_surname’] .’

profile-image

‘. $rmembers[‘f_year_group’] .’
‘. $rmembers[‘f_phone_work’] .’

‘. $rmembers[‘f_occupation’] .’

‘. $rmembers[‘f_place_of_work’] .’

‘. $rmembers[‘f_address’] .’
‘.
$rmembers[‘f_city’] .’
‘.
$rmembers[‘f_country’] .’

‘. $rmembers[‘f_email’] .’

‘. $rmembers[‘f_phone_mobile’] .’

‘;
}
echo ‘

‘;
[/insert_php]