I’m making a form using PHP and MySQL and I need to register users that have different ID Cards (Some are organizations, other are from other countries; some are numerics other have letters) and I need that ID to be unique in order to in an easy way load the user data, but I don’t know how to face up this situation.
I want to listen your expert advice to do in the best way as possible.
In the form sometimes one user refer to others, for example there is a field “sponsor” and the idea is to load the sponsor data only writing his ID.
I really appreciate any suggestions.
You can not guarantee that numbers on ID-cards are unique across the whole world.
Your user table needs an ID-column that is separate from other data. An integer is usually fine.
You would then have to search using the card number and, in case of more than one hit, other attributes that are known about the customer.