update page now

Voting

: five plus one?
(Example: nine)

The Note You're Voting On

julius at infoguiden dot no
22 years ago
If you have reserved names in a database that you don't want others to use, i find this to work pretty good. 
I added strtoupper to the variables to validate typing only. Taking case into consideration will decrease similarity. 

<?php
$query = mysql_query("select * from $table") or die("Query failed");

while ($row = mysql_fetch_array($query)) {
      similar_text(strtoupper($_POST['name']), strtoupper($row['reserved']), $similarity_pst);
      if (number_format($similarity_pst, 0) > 90){
        $too_similar = $row['reserved'];
        print "The name you entered is too similar the reserved name &quot;".$row['reserved']."&quot;";
        break;
       }
    }
?>

<< Back to user notes page

To Top