Android PHP server
<p>i working in Android app that send information to a php server.
the Android app should login first then if the login successful start to send the data 
this is the php page (login):</p>

<pre><code>&lt;?php
$data = file_get_contents('php://input');
$json = json_decode($data);
$id=$json-&gt;{'im'};

$con = mysql_connect('localhost','root','1111');
mysql_select_db('root') or die(' ');
$sql = "SELECT name FROM chiled WHERE `im` LIKE $id ";

$query = mysql_query( $sql );

$a=mysql_fetch_row($query);
print(json_encode($a[0]));
$n=$json-&gt;{'name'};


mysql_close();
?&gt;
</code></pre>

<p>the php page receive the id from the android app then check if it in the DB then send response to the android app, according to the received response the app will decided if the login successful or not ,if the login  successful then start send the data.
what do you think the best way to start to receive the data in the php server(if the login  successful )?can i put a new page to receive(create a new connection in android app that connect to another page then start to send the data) the data or i can do that in the same login page .</p>
