Modified php files to use user_id as primary key