</h2>
                            </div>
                            <div class="mdl-card__supporting-text">

                                <input type="hidden" name="new" value="1" />
                                <?php 
for ($x = 0; $x < $arrlength; $x++) {
    if ($types_array[$x] != "linked_exam" && $types_array[$x] != "linked_phd" && $types_array[$x] != "id" && $types_array[$x] != "responsible_person") {
        ?>

                                    <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
                                        <input value="<?php 
        echo $pre_single_result[$types_array[$x]];
        ?>
" pattern="<?php 
        $error_array = getPattern($types_array[$x]);
        echo $error_array[0];
        ?>
" class="mdl-textfield__input" type="text" name="<?php 
        echo $types_array[$x];
        ?>
">
                                        <label class=" mdl-textfield__label " for="<?php 
        echo $types_array[$x];
        ?>
">
                                            <?php 
        echo $strings_array[$x];
        ?>
                                        </label>
                                        <span class="mdl-textfield__error"><?php 
Example #2
0
     } elseif ($D > 0 && $I > 0 && $S <= 0 && $C > 0 && $C >= $I && $I >= $D) {
         $pattern = 39;
     } elseif ($D > 0 && $I <= 0 && $S > 0 && $C > 0 && $C >= $S && $S >= $D) {
         $pattern = 40;
     } else {
         $pattern = 0;
     }
     $sql = "SELECT * FROM tbl_patterns WHERE id={$pattern}";
     $result = $db->query($sql);
     $data = $result->fetch_object();
     $result->free();
     return array($disc, $data);
 }
 $line1 = getPattern($db, $result, 1);
 $line2 = getPattern($db, $result, 2);
 $line3 = getPattern($db, $result, 3);
 ?>
 <header><h1>:: DISC Personality Result</h1></header>
 <div id='container'>
   <script src="js/raphael.min.js"></script>
   <script src="js/jquery.min.js"></script>
   <script src="js/morris.min.js"></script>
   <script>
   $(function(){
     Morris.Line({
       element: 'graph',
       data: [
         <?php 
 echo "\n            { y: 'D', a: {$line1[0]->d}, b:{$line2[0]->d}, c:{$line3[0]->d}},\n            { y: 'I', a: {$line1[0]->i},  b:{$line2[0]->i}, c:{$line3[0]->i}},\n            { y: 'S', a: {$line1[0]->s},  b:{$line2[0]->s}, c:{$line3[0]->s}},\n            { y: 'C', a: {$line1[0]->c},  b:{$line2[0]->c}, c:{$line3[0]->c}},\n            ";
 ?>
       ],