Just for the hell of it, vfwood, let's assume he is using a db (anything else would be dumb, imo)... Jon, put a unique index on the user_name column, then you can either check first select count(*) from user where user_name = '$user_name' or insert the user name with an @ sign to suppress the unique key error. If you get it, you'll know.