Location: PHPKode > scripts > CodeBreak - Hidden Morse Code > codebreak-hidden-morse-code/decode_database.inc.php
<?php
$working_words = explode(" ", $input_text);
$num_elements = count($working_words);
for ($idx = 0; $idx < $num_elements; ++$idx) {
    $result = mysql_query("SELECT code_" . $_POST["encode_method"] . " FROM dictionary WHERE words = '" . $working_words[$idx] . "'");
    if (($num_rows = mysql_num_rows($result)) != 0) {
        while ($row = mysql_fetch_row($result)) {
            $output_text .= "^" . trim($row[0]) . "^";
        }
    } else {
        $output_text = "*** INVALID ENTRY ***";
        break;
    }
}
include("decode_morse.inc.php");
?>
Return current item: CodeBreak - Hidden Morse Code