Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.
while ($row = mysql_fetch_array($sql)){
if (preg_match("#(.*?)$name(.*?)#i", $row['name'])) $points += 1;
if ($points >= $total_points (2)) $hits[] = $row['id'];
So basically, if the preg finds the entered text anywhere in the DB record, it adds a point and if the points are greater than 2, that record is considered a 'hit'.
Can anyone tell me how I might go about improving this?
Yeah, I've never heard that indexes slowing down querying, fulltext or otherwise. The point of them is to speed things up, and they are seperate from the tables and used when necessary.
What it would slow down is that they have to be maintained, so on insert and update the index needs to also be updated, but these are typically few and far between. Selects performance is what you typically want to improve...
MySQL full-text searches are much faster and more powerful and than any search algorithm you're going to put together with regexes, unless of course you're only trying to search for that one word in a 10 row result set as demoed in your code.