hi
If i can get what you are talking about then
this is the way i solve it
Lets assume that you have a table of existing names with sr(Serial) as a primary
key autonumber field
the other field s in the table are fname , mname, lname , usertype , login , password
Login and password can be replaced with what you want
$login = strtolower(trim($login));
$fname = ucfirst(strtolower($fname));
$lname = ucfirst(strtolower($lname));
$login = strtolower($login);
$password = strtolower($password);
// strtolower bring s alll to smaller case
// This part checks the Validity of the User name for duplicates..
$connection = mysql_connect('host','dbuname','dbpwd')
$check = "select uname from users where uname = '$login'";
$res = mysql_query($check,$connection) or die($error_result);
$exists = @mysql_num_rows($res);
if ($exists ==1)
{
echo $error_login;
exit;
}
else if ($exists == 0)
{
$sql = "insert into $tname1 Values('','$fname','$lname','$login','$password','$dept','$time','$ip','$usertype')";
$result = mysql_query($sql,$connection) or die($error_select);
Hope this helps you
Pradeep
Aspbyte Creations