Show Student For KhruMuay

[:en][private]

Show Student Certificates of you.


[insert_php]
$servername = “localhost”;
$username = “imaes920_imaes2”;
$password = “dbimaes”;
$current_user = wp_get_current_user()->ID;
// Create connection
$conn = mysql_connect($servername, $username, $password);
mysql_select_db(“imaes920_dbimaes”);

// Check connection
if (!$conn) {
die(“Connection failed: ” . mysql_connect_error());
}

$user_id = get_current_user_id();
$sql = ‘SELECT * FROM `certificates` WHERE `KhruMuay_id` = “‘.$user_id.’”‘;
$results = mysql_query($sql);

//check full name country

$num = 1 ;
while($result_check = mysql_fetch_assoc($results)){
if($result_check[Type] == “M”){
$type = ‘Male’;
}else if($result_check[Type] == “F”){
$type = ‘Female’;
}

$sqlcountry = ‘SELECT * FROM `imaesdbmgm_countries` WHERE `Code3`= “‘.$result_check[ShortCodeCountry].’”‘;
$results2 = mysql_query($sqlcountry);
while($result_check2 = mysql_fetch_assoc($results2)){
$country = $result_check2[name];
}
echo ‘

‘;
$num++;
}

[/insert_php]

No. Country NF Full Name Gym Name Tamra Type Serial Number Name E-Awarded Date
‘.$num.’ ‘.$country.’ ‘.$result_check[NFFullName].’ ‘.$result_check[GymName].’ ‘.$result_check[Tamra].’ ‘.$type.’ ‘.$result_check[SerialNumber].’ ‘.$result_check[FirstName].’ ‘.$result_check[LastName].’ ‘.$result_check[Deliver_Date].’




[/private][:th][private]

Show Student Certificates of you.


[insert_php]
$servername = “localhost”;
$username = “imaes920_imaes2”;
$password = “dbimaes”;
$current_user = wp_get_current_user()->ID;
// Create connection
$conn = mysql_connect($servername, $username, $password);
mysql_select_db(“imaes920_dbimaes”);

// Check connection
if (!$conn) {
die(“Connection failed: ” . mysql_connect_error());
}

$user_id = get_current_user_id();
$sql = ‘SELECT * FROM `certificates` WHERE `KhruMuay_id` = “‘.$user_id.’”‘;
$results = mysql_query($sql);

//check full name country

$num = 1 ;
while($result_check = mysql_fetch_assoc($results)){
if($result_check[Type] == “M”){
$type = ‘Male’;
}else if($result_check[Type] == “F”){
$type = ‘Female’;
}

$sqlcountry = ‘SELECT * FROM `imaesdbmgm_countries` WHERE `Code3`= “‘.$result_check[ShortCodeCountry].’”‘;
$results2 = mysql_query($sqlcountry);
while($result_check2 = mysql_fetch_assoc($results2)){
$country = $result_check2[name];
}
echo ‘

‘;
$num++;
}

[/insert_php]

No. Country NF Full Name Gym Name Tamra Type Serial Number Name E-Awarded Date
‘.$num.’ ‘.$country.’ ‘.$result_check[NFFullName].’ ‘.$result_check[GymName].’ ‘.$result_check[Tamra].’ ‘.$type.’ ‘.$result_check[SerialNumber].’ ‘.$result_check[FirstName].’ ‘.$result_check[LastName].’ ‘.$result_check[Deliver_Date].’



[/private][:]