Well, what is field5, is it a number, a string, an email address? If it's a number then checking for '=' might be enough, but if it's some other string then you'd probably want to trim white space and make it all the same case or something like that.
Or did you mean details on creating a plugin? You can look in the manual here: http://www.vbulletin.com/en/manual/ . Select your vb version from the dropdown first, then search for plugin and go to "Adding or Editing a plugin".