No, do not do it this way. It violates the first normal form
] of relational database design. Every new profileid should go into a new row of its own, not concatenating with existing value. You should have 2 tables, say a users table and another profiles table (one-to-many relationship) like this:
user_id (primary key)
user_id (primary key and foreign key to user_id of users table)
profile_id (primary key)
When a user clicks on a profile, the user_id and the profile_id and other related information will be inserted as a new row once in the profiles table. The composite primary key of user_id and profile_id will ensures that no same pair of these values got inserted twice.