SHARE
TWEET

Register Function with Save Option

kkDav1337 Jun 30th, 2020 1,337 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function Init()
  2. io.write("Welcome to Register Form!\n")
  3. Register()
  4. end
  5.  
  6. function Register()
  7. local firstname,lastname = '',''
  8. io.write('Your First Name: ')
  9. firstname = io.read()
  10. io.write('Your Last Name: ')
  11. lastname = io.read()
  12. io.write('Your Email: ')
  13. email = io.read()
  14. io.write('Your Phone: ')
  15. phone = io.read()
  16. file = io.open('register.txt', 'a')
  17. file:write('\n','Full Name: ',firstname,' ',lastname,'\n','E-Mail: ',email,'\n','Phone: ',phone,'\n')
  18. end
  19.  
  20. Init()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top