SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard johnn's Avatar
    Join Date
    Mar 2001
    Location
    Southern California, USA
    Posts
    1,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    clicking submit button twice

    Hello,
    Is there a problem if a user clicks submit twice in a row in php? Does php count it as one click?

    Thanks in advance,
    John

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Probably yes, to be sure you can use a bit of javascript to disable the submit button after clicking it. I think it looks like this

    <script language="javascript">
    var submitPressed = '';

    function check_submit() {
    if(submitPressed == "") {
    submitPressed = 1;
    }
    else {
    return false;
    }
    }

    </script>


    <input type="submit" name="submit" value="submit" onClick="check_submit(); ">



    I think that is how it works, I posted this same solution a few months back try searching for my name and submit.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.


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
  •