i want to get the result on the same page with the form too!! anyone please!!
<?
}
else
require ‘db.php’;
function spellcheck($word) {
$output = array();
$word = mysql_real_escape_string($word);
$words = mysql_query(“SELECT `word`english`word
if (!$words) {
die(‘Invalid query: ‘ . mysql_error());
}
while(($words_row = mysql_fetch_assoc($words)) !== false && (in_array($word, $words_row) == false)) {
similar_text($word, $words_row[‘word’], $percent) ;
// echo $words_row[‘word’].’ presentasi ‘ .$percent .’ <p>’;
if ($percent > 75) {
echo ‘<p>’. ‘do you mean’ . ‘<p>’. $words_row[‘word’]. ‘<br>’;
echo ‘<p>’;
}
}
return (empty($output)) ? false : $output;
}
if (isset($_POST [‘word’]) && trim($
$word = $_POST[‘word’];
$spellcheck = spellcheck ($word);
if($spellcheck !== false){
echo ‘<pre> ‘,print_r($spellcheck, true), ‘ </prev>’ ;
}
}
// echo(“dont know dat word!! Data w blum updated lu!”);
//}
mysql_close($link);
}
?>
<form id=”main” class=”form-wrapper” name=frm method=”POST” action=”securedpage.php?act=sm”>
<link rel=”stylesheet” type=”text/css” href=”login.css”>
Word : <input type=text class=”text-field” name=”word”> <input class=”button” type=”submit” name=”submit” value=”translate” >
<input name=”clear” class=”button” type=”reset” value=”Clear” >
<script>$(“#main”).submit();</script>