If it's informal, you can say "Hi, I'm [first name]. Immediately after you've stated your name, ask for the other person's name by saying "And you are...?" in a questioning tone. When you learn the other person's name, repeat it by saying "It's a pleasure to meet you, John" or "Nice to meet you, Jane." Repeating the name will help you remember it, and give the introduction a more personal touch.