Código PHP:
MySqlConnection con = new MySqlConnection("server=localhost; userid=root; database=registro");
try
{
//consulta a ser ejecutada
MySqlCommand com = new MySqlCommand("SELECT usuario,pass FROM tabla_registro WHERE usuario='" + text_user_ingreso.Text + "' and pass='" + text_pass_ingreso.Text + "'",con);
con.Open();
com.ExecuteNonQuery();
DataSet ds = new DataSet();
MySqlDataAdapter ad = new MySqlDataAdapter(com);
ad.Fill(ds, "tabla_registro");
DataRow dr;
dr = ds.Tables["tabla_registro"].Rows[0];
if ((text_user_ingreso.Text == dr["usuario"].ToString()) || (text_pass_ingreso.Text == dr["pass"].ToString()))
{
Form_entrada form = new Form_entrada();
form.Show();
}
}
catch { }
finally
{
con.Close();
}