Let’s keep these short and to the point.
Not everyone has a first and last name.
Perhaps Just store Name in a database.
Internet connections can cut out at any moment while using a web form.
Show a proper error and test for this using your web browser development tools.