problem, help please

Discussion in 'Databases' started by maiq, Mar 1, 2008.

  1. #1
    Hi,

    i have a problem with duplicated requests in a script.
    Here`s how it works:

    user earns points and has the option to turn the points in credits.
    one form one text field, 2 sql queries, one to subtract the # of points and one to add the # of credits. They need to have at least 61 points to convert into credits and also need to remain with 60 points after the transaction.
    If they don`t have 61 they can`t see the form.

    Problem is:
    User has 65 points. Goes to the form and converts 5 points into credits. But they manage somehow to make the script execute multiple times.

    So there will be like 4 transactions, they convert 20 points in stead of 5 and still end up with 60 points remaining.

    I know it`s not refreshing the page, because I check to see if they have the amount of points. And they do it at different times, once at 05:19 and again at 05:20 same thing is executed.


    Any idea how they do it and how I can fix it?

    Thanks
     
    maiq, Mar 1, 2008 IP
  2. able

    able Peon

    Messages:
    44
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Are you checking the balances when the form is submitted or only when creating the form?
     
    able, Mar 2, 2008 IP
  3. Security-Job

    Security-Job Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    tolking about ur problem with admins...
     
    Security-Job, Mar 4, 2008 IP