1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2010
    Rep Power

    Need help with Error Messages

    I have a "Create Account" web form, and am looking for a better way to handle (non-validation) error-messages.

    When the form is submitted, I process the form and assign various "outcome codes" (e.g. 61='Insert Succeeded') to a session variable, and then redirect to an "Outcome Page" where I use a switch statement to display the appropriate message.

    How do you handle error codes/message?

    Any suggestions to create a more sophisticated approach?


  2. #2
  3. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Pennsylvania, USA
    Rep Power
    Yes, using OOP to hold plaintext error messages in static class variables.

    If you want to take the next step in programming, you absolutely must learn OOP.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

IMN logo majestic logo threadwatch logo seochat tools logo