Assigning Form Data To Different User ID Each Time?
The title may be a bit confusing. I believe this needs some explanation, hehe. Thanks ahead of time to anyone that reads!
I have a recruitment system that I built with Code Igniter. Basically it is a database of insurance agent leads. We have several "Marketers" who add leads manually. I also built several email blasts that we send out to a list of insurance agents, the email blasts include a link, once the link is clicked it brings them to a page with a pop-up form to fill out for more information on the product. Right now, once that form is filled out I just have it send an email to me, and we manually disperse each lead to different marketers through the system manually.
My goal is to take the lead from the email form and insert it into my recruitment system database. The only confusing part, that I can't seem to wrap my head around. Is how do I go about randomly selecting a marketer and assigning it to that person? I have a table called `users` and in there, there is a column for id. Is there a way, to select all these ID's and assign each new lead that comes into the system to a different ID each time? I know I could accomplish this by randomly picking an ID that is in the system. But I don't want to skip any of the marketers and if I'm not mistaken, randomly picking a marketer id could potentially assign a lead to that same marketer twice, rather than go through each marketer and assign a new lead to each one. I would like it to be as fair as possible if that makes any sense?
Sorry if this makes no sense. But I would appreciate any guidance. I'm not asking for the code, just some guidance as I am lost myself!