Use ajax to update_post_meta
That will not work because you are referring to a single php file, instead the the whole WordPress environment. There’s a easier way to use ajax in WordPress. Use admin_url(‘admin-ajax’) as the form action, then put the function that will answer the ajax call in the theme’s functions.php. More detail here in this answer