
March 18th, 2000, 03:59 PM
|
|
Contributing User
|
|
Join Date: Mar 2000
Location: Ontario, Canada
Posts: 498
  
Time spent in forums: < 1 sec
Reputation Power: 17
|
|
|
Well, you can always MacGuyver up a while loop to check all the fields in the table, eg;
(this assumes you use odbc database, and the first field is where the username is stored)
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
while(odbc_fetch_row($cur)) {
$tmp = odbc_result($cur,1)
if ($tmp != $username) { $username_free = "FALSE"; break; } else { continue; }
}
$username_free = "TRUE";
[/code]
This loops through the table, checking the 'username' field. If it doesn't find a match, it sets the variable as 'true', otherwise it returns a 'false'.
|