/    Sign up×
Community /Pin to ProfileBookmark

please help ,algorithm has this guy used for the spellcheck?

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` FROM `english` WHERE LEFT( `word`, 1) = ‘”.substr($word, 0, 1).”‘”);
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($_POST[‘word’]) != null) {

$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>

to post a comment
HTML

6 Comments(s)

Copy linkTweet thisAlerts:
@COBOLdinosaurJul 03.2013 — Why don't you just ask them?
Copy linkTweet thisAlerts:
@hamsahaliauthorJul 03.2013 — i did ask them! and tweeted them but no answer until now, so please if anybody knows , just reply me, thx
Copy linkTweet thisAlerts:
@hamsahaliauthorJul 05.2013 — Why don't you just ask them?[/QUOTE]

do u know what algorithm is this please?
Copy linkTweet thisAlerts:
@COBOLdinosaurJul 05.2013 — Probably something custom, and the code is worthless without the database and included file anyway.
Copy linkTweet thisAlerts:
@hamsahaliauthorJul 05.2013 — Probably something custom, and the code is worthless without the database and included file anyway.[/QUOTE]

well the included file is just the connection to the database and the database table is called english and it has one row called words which all words are saved.
Copy linkTweet thisAlerts:
@COBOLdinosaurJul 06.2013 — Then you already have everything. If you don't understand the functions, that is what the php and mysql manuals are for. You either understand the code or you don't. There is no magic it is just string comparisons.
×

Success!

Help @hamsahali spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.27,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...