File: //proc/self/cwd/aptitude-test/test_ability_description.php
<?php
ini_set('dsiplay_errors', 1);
error_reporting(E_ALL);
include_once('../wp-config.php');
global $wpdb;
$PSY_ABILITY = $wpdb->prefix . PSY_ABILITY;
$PSY_ABILITY_STEN_DESC = $wpdb->prefix . PSY_ABILITY_STEN_DESC;
$ability_id = $_REQUEST['ability_id'];
$score = $_REQUEST['score'];
$topic_name = $_REQUEST['topic_name'];
$abilityDesc = $wpdb->get_row("SELECT full_name,description from $PSY_ABILITY where ability_id='$ability_id'");
// echo "SELECT description from psycho_ability_sten_desc where ability_id='$ability_id' and sten_scores IN($score)";
$stenDesc = $wpdb->get_row("SELECT description from $PSY_ABILITY_STEN_DESC where ability_id='$ability_id' and FIND_IN_SET($score,sten_scores)");
?>
<div>
<h2 class="display-3"><?php echo $abilityDesc->full_name.'( '.$topic_name.' )'; ?></h2>
<p><?php echo $abilityDesc->description; ?></p>
</div>
<div class="sten-score">
<h3 class="display-3">Your STEN Score in <span style="color: #f15c80;"> <?php echo $topic_name; ?> </span> : <span style="color: #8085e9;
font-weight: bold;"> <?php echo $score; ?> </span></h3>
<p><?php echo $stenDesc->description; ?></p>
</div>