Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need a script that will rotate & distribute form results to 50+ ppl.

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I was wondering if you could help me. I am looking for a script that would email form results generated from an application form on my website, and distribute them evenly between 50+ agents that work for my company. The form results would need to be emailed to me as well as to the appropriate agent. i.e.: as user's submit form results from the website, the results would be emailed & distributed between agen #1, the next submission would go to# 2 and so on. It would also be nice if I could save the form results to a database. Is there a script out there that your aware of that would rotate form results evenly between 50+ indivdual people? I would really appreciate any help you could give me.
...Thank you.
 
that's not hard to do ...

just create a table with the form results and the date and the recepient.

then you have the agents table witch are oredered by something.

you can do is get the last recepient and search for the next one.

ex.
Agents
id
name
order
email

results
results
agent
date

select order from agents a, results r where r.agent=a.id order by date desc limit 1

select email from agents where order > $order order by order limit 1
if no result
Select email from agents order by order limit 1

Something like this probably do what you want.

thenk just email the results to yourself and to the agent. Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top