If you are trying to post data from a C# application to PHP form..
WebRequest and WebResponse Might Help you..
private void SubmitData()
string user = textBox1.Text;
string pass = textBox2.Text;
ASCIIEncoding encoding = new ASCIIEncoding();
string postData = "user=" + user + "&pass=" + pass;
byte data = encoding.GetBytes(postData);
WebRequest request = WebRequest.Create("http://codeproject.com/login.php");
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;
Stream stream = request.GetRequestStream();
stream.Write(data, 0, data.Length);
WebResponse response = request.GetResponse();
stream = response.GetResponseStream();
StreamReader sr = new StreamReader(stream);
string Result = sr.ReadToEnd();
if(Result == "true")
MessageBox.Show("The Login was Successful.");
MessageBox.Show("The Login was NOT Successful.");
catch (Exception ex)
MessageBox.Show("Error : " + ex.Message);
if(isset($_POST['user']) && isset($_POST['pass']))
$user = $_POST['user'];
$pass = $_POST['pass'];
if($pass == md5($user))
This is a small Login Script which the C# app connects to the form which is written in PHP...
Hope it Might Help..