title: how to capture data through web service (php) sql query select with condition from ios iphone sdk
body: <p>I have the following php file:</p>
  
  <pre><code>&lt;?php 
  $username="root";
  $database="testdb";
  mysql_connect(localhost,$username);
  $user=$_GET["user"];
  $password=$_GET["password"];
  $query="SELECT documento FROM person WHERE user='".$user." and  password ='".$password."'";
  
  $result=mysql_query($query) or die (mysql_error("error "));
  
  $num=mysql_numrows($result);
  
  mysql_close();
  
  $rows=array();
  
  while($r=mysql_fetch_assoc($result)){
  
  $rows[]=$r;
  
   }
   echo json_encode($rows);
  
   ?&gt;
  </code></pre>
  
  <p>to retrieve the information achieved by the following functions but the example did not have the php input conditions and parameters was <code>select * from person</code>  here the functions
   based in <a href="http://www.youtube.com/watch?feature=endscreen&amp;v=IQcLngIDf9k&amp;NR=1" rel="nofollow noreferrer">http://www.youtube.com/watch?feature=endscreen&amp;v=IQcLngIDf9k&amp;NR=1</a></p>
  
  <pre><code>-(void) getData:(NSData *) data{
  
     NSError *error;
  
     json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&amp;error];
  
  }
  
  -(void) start {
     NSURL *url = [NSURL URLWithString:kGETUrl];
  
     NSData *data = [NSData dataWithContentsOfURL:url];
  
     [self getData:data];
  
  }   
  </code></pre>
  
  <p>now as the sql statement has input parameters is not as code and tried something like this <a href="https://stackoverflow.com/questions/6156411/a-simple-php-mysql-web-service-for-ios">A Simple PHP/MySQL Web Service for iOS</a> but I can not accommodate what I need.</p>