I recently released the WordPress plugin, “Simple Promo Code”. This plugin provides a short code that allows a user ro enter a promo code to access a page or document. The form validates the promo code and tracks its usage. This can be very useful for tracking access to a document that you are promoting in an email campaign or magazine.
Use of the plugin is described on the Simple Promo Code page.
Like my other “Simple” plugins it’s well commented and was built with use as an example in mind. Feel free to pick it up and modify it to your requirements. I will be posting an annotated version of the code as a tutorial in the near future. In particular this plugin provides a small example of an HTML form that performs validation, updates a database and redirects the user to another page when complete.