In my project i need to register a donor and I need the user to enter his information and the system registers him and generate a unique id to the donor.
Use auto-incremented integer field. Or use an auto-generated GUID. (Both of these work in T-SQL, I did not try MySQL.)