title: Trying to connect to a mysql database in phonegap
body: <p>I am trying to create an app on android which makes users login in and I am using phonegap. 
  Here is my code but when i run it i get an error </p>
  
  <p>here is my index.html</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript"  src="http://code.jquery.com/jquery.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" &gt;
  function login() {
  $(document).ready(function() {
  var user = $("#user")[0].value;
  var pass = $("#pass")[0].value;
  $.ajax({
  type:"GET",
  url:"newlogin.php",
  data: "user="+user+"&amp;pass="+pass,
  success: function(result){
  if (result){
  $("#message")[0].value = "Success "+result;
  }
  else {
  $("#message")[0].value = "error";
  }
  }
  });
  });
  }
  &lt;/script&gt;
  &lt;style type="text/css"&gt;
  body{
  margin:auto;
  width:100%;
  display: table;
  background-color: #333;
  }
  form{
  text-align: center;
  height: 500px;
  display: table-cell;
  vertical-align: middle;
  }
  input{
  font-size: 20px;
  text-shadow: #ccc 2px 2px;
  text-align: center;
  }
  input#message {
  background-color: transparent;
  border: 0;
  color: white;
  text-shadow: #5191C1 2px 2px;
  }
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form&gt;
      &lt;input type="text" size="25" id="user" onkeyup= "login()" /&gt;
      &lt;br /&gt;
      &lt;input type="text" size="25" id="pass" onkeyup= "login()"/&gt;
      &lt;br /&gt;
      &lt;input type="text" size="25" id="message" value="hey" /&gt;
      &lt;/form&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and here is the newlogin.php it connects to </p>
  
  <pre><code>&lt;?php 
  $user = $_REQUEST['user'];
  $pass = $_REQUEST['pass'];
  
  mysql_connect("localhost","root","sercet") or die(mysql_error());
  mysql_select_db("book") or die(mysql_error());
  
  $result = mysql_query("SELECT username,password,id FROM book_users WHERE username = '$user'");
  while($row = mysql_fetch_array($result)) {
      if($pass == $row["password"]){
          echo $row["id"];
          } 
          else {
              echo "";
              }
  
      }
  
  ?&gt;
  </code></pre>
  
  <p>I hope you code help me find the solution to this problem</p>
  
  <p>I Get the error at where it shows the message where it reads <code>"Sucess + result"</code> i get <code>Sucess&lt;?php user =$_REQUEST('user')</code>....... &lt;- thats all i could see in the emulator 
  I am not sure if it might be that phonegap cannot execute php file</p>