HI I am sending a username to my php file located on the server to check if the username exists in my database. If it does I want to send back a response which contains only "False", or else it will send back "True".
Here is my php code:
<?php
$username = $_POST['username'];
$password = $_POST['passsword'];
$email = $_POST['email'];
mysql_connect(//server name, server_admin, server_password) or die(mysql_error());
mysql_select_db("a1754417_word") or die (mysql_error());
$result = mysql_query("SELECT username FROM Users WHERE username = '$username'");
if(mysql_num_rows($result) != 0){
echo mysql_num_rows;
echo "False";
}else{
echo "True";
}
?>
Here is my output from Logcat
01-13 03:16:34.606: I/Response 'False'(791): True
01-13 03:16:34.606: I/Response 'False'(791): <!-- Hosting24 Analytics Code -->
01-13 03:16:34.606: I/Response 'False'(791): <script type="text/javascript" src="http://stats.hosting24.com/count.php"></script>
01-13 03:16:34.606: I/Response 'False'(791): <!-- End Of Analytics Code -->
My code is sending back "True" correctly but it is also sending the extra information why?
Thanks in advance