Gulls flying in front of a full moon, against a blue sky

One of the significant challenges of developing a site locally is the need to sync local database changes to a remote server, often repeatedly. For years, my solution was to manually copy changes from one database to the other, which absorbed a significant amount of time.

Rebranding this site provided the opportunity to review my workflow processes, and database migration was one of the first problems I addressed. After looking at several different apps and approaches, I found an excellent solution that can be run in a single line in the Terminal of Mac OS X.

In previous articles I’ve covered the creation of a MySQL database, and how to select information from it. In this article, I’ll cover insertion of user data into a table.

Insertion of data is usually done via a web form. There are many reasons we might want to do this: the obvious cause is to record input from a user, such as a comment in a blog, or an order for a product. Here, we’ll create a simple version of the former.

First, we’ll create a simple HTML5 form on a page: