Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9123551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:22:05+00:00 2026-06-17T06:22:05+00:00

I have a registration form that I am using to register new user. No

  • 0

I have a registration form that I am using to register new user. No problem creating the username (email) and password and inserting it mysql DB. I am however wondering how would I compare the value inserted into the textbox with value of a column called Email.

Example I insert the email into textbox: bee@gmail.com and hit Next button that connects to mysql DB. I want to compare values and if Email: bee@gmail.com exist in DB table, let user know! Is this possible ?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T06:22:06+00:00Added an answer on June 17, 2026 at 6:22 am

    First Step:

    Create Procedure FindString(
    @MyString nvarchar(50))
    As
    Begin
    Select * From MyTable
    Where Value = @MyString
    End
    

    Make a class:

    public class ReadData
    {
        public bool FindString(string myString)
        {
            SqlConnection connection = new SqlConnection();
            connection.ConnectionString = "Server=..."; //Your connection string
            SqlCommand command = new SqlCommand();
            command.Connection = connection;
            command.CommandType = CommandType.StoredProcedure;
            command.CommandText = "FindString";
            command.Parameters.AddWithValue("@MyString", myString);
            try
            {
                connection.Open();
                SqlDataReader reader = command.ExecuteReader();
                while (reader.Read())
                {
                    return true;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
                if (connection.State == ConnectionState.Open)
                    connection.Close();
            }                
            return false;
        }
    }
    

    Use the class. for example :

    ReadData r = new ReadData();
    
    if (r.FindString("Shahingg"))
        MessageBox.Show("I Found it!");
    else
        MessageBox.Show("I can't Find it!");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom user registration form at: somepath/register using hook form alter. I
I'm creating a registration form. The user enters the username and password, and presses
I have a registration form that user submits, data is sent using isset($_POST) to
I have a basic form that I'm using for member registration. I'm using the
In my web application i have registration form, when user register i want to
Team I'm creating an iphone application using Sencha Touch. I have registration form ,
I have a registration form that when the user enters in valid registration data
I have a registration form where this CSS rules apply. when user submits with
I am using a third party shopping cart that sends a registration form to
I have this registration form which is then validated using "bassistance's" validate.js: $('#pForm').validate({ rules:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.