Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [WebMethod]
- public bool clientRegister(string email,string password)
- {
- string connStr = "server=localhost;user=root;database=trackingsystem;port=3306;password=root";
- MySqlConnection conn = new MySqlConnection(connStr);
- try
- {
- conn.Open();
- string sql = "insert INTO client(email,password) VALUES(@email, @password)";
- MySqlCommand cmd = new MySqlCommand(sql, conn);
- cmd.Parameters.AddWithValue("@email", email);
- cmd.Parameters.AddWithValue("@password", password);
- cmd.ExecuteReader();
- conn.Close();
- return true;
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.StackTrace);
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement