php - What kind of ID is more safer -


i'm developing small social network , database "users" has 2 id's
first 1 id_user = primary key , autonumerica 1,2,3,4,5.
1 id_uniq = it's generate php uniqid()
recommend use?, saw example facebook use long id's profile.php?id=100003565125387.., althought not same because uniqid() generate id's letters , numbers, in case kind of id safer?._

i have developed similar kind of project. , used id_user. , worked fine. problem user can find out else's id. make sure other people can't log else's account have used session. if feel not safe enough can use uniqid. depends on , how handle it. opinion.


Comments

Popular posts from this blog

ruby on rails - Is it the correct way to implement belongs_to relation with factory girl? -

geolocation - Windows Phone 8 - Keeping background location tracking active beyond four hours -

Uncaught TypeError: Cannot read property 'parentNode' of null javascript -