Confirm email box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • warder21
    New Member
    • Jan 2008
    • 5

    Confirm email box

    Hi,
    I have absolutely no experience using Java but guess this is whats needed. I simply want to add a "confirm email" box to my PHP message form. It would check the entered value against the "email address" box and if not matching display a message saying "email address does not match, please check and try again"

    Any help very much appreciated

    Warder
  • pronerd
    Recognized Expert Contributor
    • Nov 2006
    • 392

    #2
    It sounds like you are talking about a web form. If that is the case then you need JavaScript, not Java.

    Comment

    • hsn
      New Member
      • Sep 2007
      • 237

      #3
      it is a simple function in php with java script. but shouldn't you post your question in a php forum???

      kind regards
      hsn

      Comment

      • Nepomuk
        Recognized Expert Specialist
        • Aug 2007
        • 3111

        #4
        I will happily move this question to JavaScript, PHP or any other forum. I guess that JavaScript would be the better choice, but you choose.

        Greetings,
        Nepomuk

        Comment

        • pronerd
          Recognized Expert Contributor
          • Nov 2006
          • 392

          #5
          What you are wanting is pretty simple. I would just Google for some JavaScript validation examples w/ check boxes. There are lots of examples out there.

          Comment

          • warder21
            New Member
            • Jan 2008
            • 5

            #6
            Thanks for all your help guys, sorry if it was in the wrong thread. If anyone else finds this useful then post it to the Javascript forum.

            I have now found a solution by Google form validation techniques, found this website that was really useful

            CodeLifter.com - JavaScript Email Address Checker-Validator

            Once again thanks for your replys and sorry if it was in the wrong place :-(

            Warder

            Comment

            • Nepomuk
              Recognized Expert Specialist
              • Aug 2007
              • 3111

              #7
              No problem. I've moved the thread to the JavaScript Forum now.

              Greetings,
              Nepomuk (Moderator)

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

                #8
                Originally posted by warder21
                I have now found a solution by Google form validation techniques, found this website that was really useful

                CodeLifter.com - JavaScript Email Address Checker-Validator
                I'll just point out that the email address checking should be forgiving so that someone could enter any valid email. Server-side checking should also be present, of course, for the real, complete validation. Two more quick points:
                1. Use the type attribute of the script tag: language is deprecated.
                2. Use the onsubmit event handler for calling the validation function where you can return true for submission and false for preventing submission.

                Comment

                Working...