How can i make a single login form for purchaser , seller , distributer , franchiser . All have diffrent right , franchise can se all activities of distributers , seller & purchaser bt a distributer cant se franchiser data . Distributor can see only seller & purchaser . And seller can see only those purchesor whose purchase product directly . A franchiser can see only those distributors whose register by there reference id only & so Down as...

I mean to say i want make a single login form for purchaser , seller , distributer , franchiser . By login in there specifice user name & pasword they get there difrent rights

create a column that will define the rights of each person, you may have to inner join tables but i don't know how to do it in PHP. and it's up to you how are you going to enforce limitations. sorry im not that knowledgeable but i hope i have contributed.

table 1

user_type_id (1-4)
user_type (1 for purchaser, 2 for seller etc)

inner join user_type_id from table 1 and 2 (that's how i did that in C#) if that's not what you are asking for then improve it for me ^_^

In your table you can define which category a user belongs to. Use that category to check whether someone is (not) allowed to do something.

can you share whith me data base table structure for difining diffrent users to difrent rights

I have creat 5 tables , admin , franchisor , distributor , seller , purchaser
these work best ,
but how can i set these in single table , how can i set premisons & categories

Am guessing for all does tables that they are different users. All users have the same information such as name, username, password, privilege, email, etc.
The privilege column is where you are going to state what type of user he\she is, such admin, franchisor, distributor, seller or purchaser.
In your login page you can use this colomn to see what all permissions this type of user has.

diffrent tables have a problem , i want when a user name taken , will not be duplicate in my data base . but in diffrent tables it can be duplicate

like if i creat a franchiser login  = "David"
then the Seller can also obtain     = "David"

but I want a user can picked up a username which can't be repeat in my whole data base for any type of user .

if the query result returns 1 then disallow that person to register using that nickname. but i think there's still an efficient way on how to do that approach.