PHP pre-defined error displaying

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #46
    what was the message again?

    Comment

    • Matt Morgan
      New Member
      • Oct 2011
      • 41

      #47
      We are very sorry, but there were error(s) found with the form you submitted. These errors appear below.

      The RAID you entered do not appear to be valid.
      The Accessories you entered do not appear to be valid.
      The Guarantee you entered do not appear to be valid.

      Please go back and fix these errors.

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #48
        I thought it were a PHP error message. nevertheless, the problem is your validation strategy. the last time we were at "how would you check that a variable is an integer?" any ideas?

        Comment

        • Matt Morgan
          New Member
          • Oct 2011
          • 41

          #49
          They are predefined error messages on the PHP which, when an error occurs, display on the screen. I honestly have no idea.

          Comment

          • Dormilich
            Recognized Expert Expert
            • Aug 2008
            • 8694

            #50
            you have no idea what the difference between 1 and "q" is?

            Comment

            • Matt Morgan
              New Member
              • Oct 2011
              • 41

              #51
              Well thats clearly a number and a letter...

              Comment

              • Dormilich
                Recognized Expert Expert
                • Aug 2008
                • 8694

                #52
                and how do you know what a number and a letter is?

                Comment

                • Matt Morgan
                  New Member
                  • Oct 2011
                  • 41

                  #53
                  Well I went to school...

                  Comment

                  • Dormilich
                    Recognized Expert Expert
                    • Aug 2008
                    • 8694

                    #54
                    does PHP can go to school? obviously not. hence you have to tell PHP in its (PHP’s) vocabulary (read: PHP functions & language constructs) what you learned is the difference between a number and a letter. though chances are that PHP already has a basic vocabulary for letters and numbers.
                    Last edited by Dormilich; Nov 16 '11, 10:23 AM.

                    Comment

                    • Matt Morgan
                      New Member
                      • Oct 2011
                      • 41

                      #55
                      So what are you suggesting I do?
                      I know I have to change this:
                      Code:
                          if(strlen($RAID) < raid (4) Y (1), N (1)) {
                              $error_message .= 'The RAID you entered do not appear to be valid.<br />';   
                            }
                      for the respective parts which are not working, I just don't know what to.

                      Comment

                      • Matt Morgan
                        New Member
                        • Oct 2011
                        • 41

                        #56
                        The $error_message is working, I know that much, so I'm assuming it's just the top 'if' statement which is causing the issue.

                        Comment

                        Working...