Guest User

Untitled

a guest
Jul 21st, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. $q = strtolower($_GET["q"]);
  2. $q= mysql_real_escape_string($q);
  3. if (!$q) return;
  4.  
  5. $sql = ("SELECT headings FROM dictionary WHERE headings LIKE '$q%' LIMIT 3");
  6. $rsd = mysql_query($sql);
  7. while($rs = mysql_fetch_array($rsd)) {
  8. $auto = $rs['headings'];
  9. echo "$auton";
  10.  
  11. }
  12. if (mysql_num_rows(mysql_query("SELECT headings FROM dictionary WHERE headings LIKE '$q%' LIMIT 3")) == 0){
  13. $res = mysql_query("SELECT spelling FROM spellcheck WHERE spelling LIKE '$s%' LIMIT 3");
  14. while($result = mysql_fetch_array($res)) {
  15. $spell = $result['spelling'];
  16. echo "$spelln";
  17. }
  18. }
Add Comment
Please, Sign In to add comment