private void confirmReg(object sender, EventArgs e) { if (name.Text == "" || id.Text == "" || email.Text == "" || pass.Text == "" || cpass.Text == "") { MessageBox.Show("Please fill up all the requirements first"); return; } if (Valid()) { string query = "insert into userinfo values ('" + name.Text + "','" + id.Text + "','" + email.Text + "','" + pass.Text + "')"; database db = new database(); if (db.Table("select * from userinfo where name = '" + name.Text + "'").Rows.Count > 0) { MessageBox.Show("User with that name already exists"); return; } db.update(query); MessageBox.Show("Registration Successful"); this.Hide(); opt.Show(); this.Close(); } else { MessageBox.Show("Passwords didn't match!"); } return; }
private void button3_Click(object sender, EventArgs e) { options OP = new options(); OP.Show(); }
private void prevPage(object sender, EventArgs e) { this.Hide(); opt.Show(); this.Close(); }