Subscription Plan in PHP

Hi, I’m trying to create a subscription system for my php application, the subscription should only work for administrator and not regular users.

I’ve got the users table in mysql which stores all users admins and clients

user_id 
user_first 
user_last 
user_fiscalcode
user_iddocument 
user_birth 
user_telephone
user_address 
user_postcode
user_city
user_name 
user_password 
user_role 
user_email 

And the subscription table

user_subscription_id 
user_subscription_desc 
user_subscription_file_quota 
user_subscription_img_quota 
user_subscription_start 
user_subscription_end 

Now the question is how can I relate only the user admin to one of the subscriptions I’ve defined in the subscription table? Do you have any other idea on how to set this up?

Many thanks

You would have a “look up table”.
A column for user_id paired with a column for subscription_id.
This will hold key pairs to associate the data between the two other tables.

1 Like

Hi @SamA74 thanks for your answer. I’ve created the join table and it seems to work fine :wink:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.