Hello;
I'm wondering how much server resources it takes to use the similar_text() function like I got it below.
The reason I ask is that I'm working on a login script where the user forgets their username. There's a form where they enter their first and last names. The form then posts it to a script that loops through the entire table in the database and compares the user input to the database information line by line.
I was thinking about, on the registration form, asking the user to input their birthdate. That way I could eliminate the number of rows that gets extracted from the db.
It may not be practical to ask the user to enter their birthdate because a secretary at a business may be the one who actually opens the account. If the secretary quit then the persons remaining at the company might not know her birth date - but they would likely remember her name.
If I get 500 users I will be tickled. I'm just wondering about bogging the server down if there are several searches at once or if the table grows to a few thousand records.
Can anybody tell me how much server resources what I'm talking about will take?
// Loops through the entire table.
// Extract from db
$FirstNameDB = trim(strtolower($Row['FirstName']));
$LastNameDB = trim(strtolower($Row['LastName']));
$FirstLastNameDB = $FirstNameDB."".$LastNameDB;
// Extract from form.
$FirstName = trim(strtolower($FirstName));
$LastName = trim(strtolower($LastName));
$FirstLastName = $FirstName."".$LastName;
// Compare user input to first, last name stored in the db.
similar_text($FirstLastName, $FirstLastNameDB, $Percent);
Thanks.