We've learned how to create a local database and a table associated to it. The next logical step will be to insert records in our recent table. For our new goal, we're going to use a simple form where a user can type the values for our fields. Traditional web applications are using the same method. Obviously, our form will contain a button for doing the action.
You can insert records as you desire, but remember the database has size restrictions. We set this value through a parameter passed in the function, which opens or creates our database. The form introduced in this recipe allows you to save many records and the application will display a simple alert box after each insertion.
The code for the application of this recipe contains only one HTML file located at code/ch07/insert_rec.html
in the code bundle provided on the Packtpub site.