Math problem

Results 1 to 4 of 4

Thread: Math problem

  1. #1
    Math Wiz Guest

    Default Math problem

    I would like to redirect every one hundred users to a different page. I was thinking about using an array but I&#039;m not sure if that is the most effecient way. <BR><BR>I am tracking users in a database and have an idea of how I can do it but would like some more input.....<BR><BR>Any attention to this matter would be greatly appreciated.<BR><BR>Thanks,<BR><BR>Math Bonehead

  2. #2
    Kasper Guest

    Default RE: Math problem

    Write yourself a simple counter and whenever the number eq 100, 200 etc redirect them. You&#039;ll want to write a counter that tracks users, not just page hits (as in hitting refresh wouldn&#039;t increment the counter)

  3. #3
    Math Wiz Guest

    Default RE: Math problem

    I understand that I could write a case statement to accept the user hits but what if there are a million hits, I don&#039;t want to say:<BR><BR>Case "100"<BR> redirect----<BR>Case "200"<BR> redirect ---<BR>Case "300" --<BR>all the way to 1 million.....<BR><BR>There has to be a way to calculate every hundred from the current count without doing the above.......the above will work for a short term solution.....but not for a long term.<BR><BR>Thanks for any additional help....

  4. #4
    Steve Cimino Guest

    Default RE: Math problem

    Check out the modulus operator...<BR><BR>If yourvariable % 100 Then

Posting Permissions

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