I am sorry you have forgotten your lock code. You can try dialing ##3282# on your phone and go to view and go to advanced and see if you can scroll down to lock code and see if that will give it to you?
If not you can reset it back to original factory settings if you are still able to access information on your phone. You will need to call customer service to get the msl code to reset.
You can also visit your local service and repair store and they will be glad to assist you as well.
By default your lock code is the last 4 digits of your mobile number. If you have changed and forgot and you are still able to access your phone, you can try the ##3282# that I posted above or else you may try calling customer service and see if they can re-program your phone and that may default your lock code back to last 4 of your mobile number.
What's your phone model? If you forget the phone security code then try default code like 0000 or 1234 to reset it .If it doesn't reset your mobile then visit Unlocking4free.com here they provide master reset code for some Nokia DCT phone and Alcatel old mobile models at free of cost using this code you can reset your mobile and again set a new password.
Check out a fun infographic that teaches you how to increase storage, enhance security, improve battery life and clean your device.