include '../config.php'; $turl = "Vocabulary-Game"; $HeadT = "Vocabulary-Game"; $HeadD = "Write a word that starts with last letter of prior word. Vocabulary based word games to build English language skills. " ; include '../header.php' ; $correct_ans=$_POST['correct_ans']; $wrong_ans=$_POST['wrong_ans']; if (isset($_POST['c_my'])) { $c_my = trim($_POST['c_my']); } if (isset($_POST['next_cc'])) { $next_cc = $_POST['next_cc']; } if (isset($_POST['last_cc'])) { $last_cc = $_POST['last_cc']; } $last_cc = stripslashes($last_cc); if ($c_my != '') { $s_check=mysql_query("SELECT count(*) as ch1 FROM ce_dict where word = '".$c_my."' and word REGEXP '^". $next_cc ."' and word not in ('' ".$last_cc.")",$link); $s_check1=mysql_fetch_array($s_check); $ch1 = $s_check1['ch1']; if ( $ch1 > 0) { $my_ans = 'Correct'; $new_cc = substr($c_my, -1); $last_cc = $last_cc . ", '" . $c_my . "'"; $correct_ans = $correct_ans +1; } else { $my_ans = 'Wrong'; $wrong_ans = $wrong_ans +1; } } //Next Country $s_cico=mysql_query("SELECT * FROM ce_dictionary where word REGEXP '^". $new_cc ."' and word not in ('' ".$last_cc.") order by rand() limit 1",$link); $s_cico1=mysql_fetch_array($s_cico); $word =$s_cico1['word']; $next_cc = substr($word, -1); $last_cc = $last_cc . ", '" . $word . "'"; ?> if ($c_my != '') { ?>