how user logs in you should get the info about user ( ie the user id) and before allowing user to edit any info. Only then you should allow user to update info and based on the user id update DB