title: how to get values from mysql using php?
body: <p>hi i am trying to get values from mysql database to display values in UITextField.
  here my php coding </p>
  
  <pre><code>&lt;?php
  
  $host = "localhost"; 
  $user = "xcode"; 
  $pass = "xcode"; 
  $db="xcode";
  
  $r = mysql_connect($host, $user, $pass);
  
  if (!$r) {
      echo "Could not connect to server\n";
  trigger_error(mysql_error(), E_USER_ERROR);
  } else {
      echo "Connection established\n"; 
  }
  
  echo mysql_get_server_info() . "\n"; 
  $r2 = mysql_select_db($db);
  
  if (!$r2) {
      echo "Cannot select database\n";
   trigger_error(mysql_error(), E_USER_ERROR);
   } else {
  echo "database selected\n"; 
   }
  $sql="select address,phone from login where name='{$_GET['name']}'";
  if(!mysql_query($sql))
  {
  trigger_error(mysql_error(), E_USER_ERROR);
  }
  else
  {
     echo"1 record added";
  }
  mysql_close();
  
  ?&gt;
  </code></pre>
  
  <p>here my Xcode</p>
  
  <pre><code>- (IBAction)find:(id)sender {
  NSString *strURL=[NSString stringWithFormat:@"http://192.168.1.12:81/priya/sam.php?name=%@",name.text];
  
  
  
  NSData *dataURL=[NSData dataWithContentsOfURL:[NSURL URLWithString:strURL]];
  
  NSString *strResult=[[NSString alloc] initWithData:dataURL encoding:NSUTF8StringEncoding];
  NSLog(@"%@",strResult);
  </code></pre>
  
  <p>}</p>
  
  <p>i want to display address and phone in text field in storyboard. </p>