Added function to register purchase in database

Added function to register purchase in database
Also, minor bugfix.

    application/models/purchase_model.php
Added client side form validation

Added client side form validation
    README.md
    application/views/pages/buy.php
    javascript/buy.js
    javascript/jquery.validate.min.js   (+)
    license.txt