Moodle has a simple built-in database activity that lets students submit data items into a teacher-created database. No coding is required. It is possible for the instructor to set up various types of fields that students can enter data and search the database for previously entered items.
The database activity uses a templating system for data entry, list display, and single item display. In some cases, the rich-text editor tries to autocomplete HTML tags on more complex templates. If you are having trouble, try going to your profile (by clicking on your name in the top right of the Moodle page) → Settings → Edit Profile → When Editing Text pulldown → Use Standard Web forms. You will probably want to switch it back to "Use HTML Editor" once you are done with the template editing.