There are more columns in the database table, after which you insert them to get an error. (You probably do not represent your userID field, which is probably your primary key). You need to indicate in which fields the data is in your request:
$query = "INSERT INTO user_master (first_name, last_name, user_name, email) VALUES" . "('$first' , '$last' , '$user_name' , '$email')";
source share