SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2004
    Location
    Tacoma, WA
    Posts
    178
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lead Rotator Script

    I'm trying to figure out how to create a rotator script for lead generation where every single form submission will rotate to a new person then go back to the first person in the database. How would I go about doing this?

    I was thinking that I would need to set a number in the database on which record count it was on and then increment it by one. Upon the last record it resets to "0" or the first record. This is what I'm thinking.

    Does anyone know of a tutorial or code snippet that would do something like this? Or is there a better way of doing this?

  2. #2
    Non-Member
    Join Date
    Apr 2011
    Location
    no fixed address
    Posts
    851
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There's a few ways you can do this. One way:

    In a db table containing the names of those receiving the forms, add a column with a number in it being the order of people you want the form submissions to go to. In another table, store the order number of the person who received the last form submission. Then on each form submission, get the order number of the previous submission, increment it by 1 or set to 1 if needed and then assign the form to the next person in the loop.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •