You could use jQuery keypress in the input text that you want to spell check. Then using .ajax send the value from the input text to the server and check if the value received it's similar to anything that you have in your database. Here is a similar question regarding this last part.
So in general you do this in the html
<h2>Search</h2>
<form name="search" method="post" action="<?=$PHP_SELF?>">
Seach for: <input type="text" name="find" id="find" /> in
<Select NAME="field">
<Option VALUE="fname">diseasename</option>
<Option VALUE="lname">genename</option>
</Select>
<input type="hidden" name="searching" value="yes" />
<input type="submit" name="search" value="Search" />
</form>
</html>
<script>
$( "#search" ).keypress(function(event) {
var value = $(this).val();
$.ajax({
type:"POST" // or GET ,
url: "search.php", // the url to the php file
data: {value:value}, //send the value
success:function( msg){
//update your input text to indicate if you have an error
},
});
});
<script>
And in the php you need to do something with this value. Depending what you want to do. If you want to show suggestion then it's something like the link I put before (this). But if you only want to check if the word exists then it's only something like this:
<?php
//some code
$value = $_POST['value'];
//connect to the data base and make stuff to prevent sql injection
$sql = "SELECT name FROM myTable WHERE name = '".$value."'"; //this is just an example
?>
Of course this is an extremely simple example. You could use LIKE operator or more complex stuff
Hope it helps