Also, the PHP script should take request variables e.g.

<?php

//connect to server
$connect = mysql_connect("host","user","password");
//connect to database
mysql_select_db("db_name");
//query the database
$query=mysql_query("

INSERT INTO  `db_name`.`table_name`
(`name` ,
`flag`)
VALUES ( '".$_REQUEST['key']."',  '".$_REQUEST['key']."')
");


print(json_encode($output));

mysql_close();

?>

Key should match the key in the NameValuePair  key in your java code.

I hope this helps

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to