10-Register New User

2
9079

This tutorial is all about Register New User.
In this tutorial, I’m going to teach you how to register a new user in the User’s Registration Form. with this, you can add the users with there different types.

 

 

So let’s begin:

 

 

Open the file of “EmployeesInformationSystem” that you had created and go to the “ManageUserForm“. After that, double click the Form and add the following code for adding the items in the ComboBox, and setting up the “Password” TextBox.

  1. Private Sub ManageUserForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  2. 'MAKING THE TEXT INTO DOTS IN THE PASSWORD TEXTBOX
  3. txtPassword.UseSystemPasswordChar = True
  4. 'ADD ITEM IN THE COMBOBOX
  5. With cboType.Items
  6. .Add("Administrator")
  7. .Add("Staff")
  8. .Add("Encoder")
  9. End With
  10. End Sub

Go back to the Form Design and double click the “Save” Button to fire the Click event handler of it. Set a insert query and call a method that you had created in saving the data in the MySQL Database.

  1. Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
  2. query = "insert into <code>useraccounts</code> (<code>USER_ID</code>, <code>UNAME</code>, <code>USERNAME</code>, <code>PASS</code>, <code>TYPE</code>)" &amp; _
  3. "values ('" &amp; txtUserId.Text &amp; "','" &amp; txtName.Text &amp; "','" &amp; txtUsername.Text &amp; _
  4. "','" &amp; txtPassword.Text &amp; "','" &amp; cboType.Text &amp; "')"
  5. mysqlCreate(query)
  6. End Sub

 

Readers might read also:

 

 

Facebook Comments

2 COMMENTS

  1. salut, je voudrais savoir a manière dont tomber enceinte plus vite car ça va faire 8mois que l’on essaye de posséder un bambin. Merci de me répondre terriblement rapidement, une grand merci.

LEAVE A REPLY

Please enter your comment!
Please enter your name here