title: Update data into MySQL using PHP
body: <p>I have written a PHP Script to insert data into MySQL, for client side i am using Android, by using first button i am uploading Image and by using second button I am storing Image Information into same table (Information like:- PersonName) i have around 10 fields.</p>
  
  <p>but I am not getting my data in a same row, see below screen shot:-</p>
  
  <p><img src="https://i.stack.imgur.com/RaBt7.png" alt="enter image description here"></p>
  
  <p>I guess to store data in a same row, i need to use Update Query, but by Profession I am an Android Developer, so not strong in PHP, but i guess this is a small issue for any PHP Developer, please see my PHP Script below:</p>
  
  <pre><code>&lt;?php
  //*** Insert Record ***//
  $objConnect = mysql_connect("localhost","root","");
  $objDB = mysql_select_db("myDatabase");
  
  
  /*** Check Username Exists ***/
  $strSQL = "SELECT * FROM image_information WHERE ImageName = '".$_FILES["filUpload"]["name"]."' ";
  $objQuery = mysql_query($strSQL);
  $objResult = mysql_fetch_array($objQuery);
  if($objResult)
  {
  $arr['StatusID'] = "0";
  $arr['Message'] = "File Name Exists";
  echo json_encode($arr);
  exit();
  }
  
  $strPersonName = $_POST["sPersonName"];
  
  $strSQL = "INSERT INTO image_information";
  $strSQL .="(ImageName, PersonName) VALUES ('".$_FILES["filUpload"]["name"]."','".$strPersonName."')";
  $objQuery = mysql_query($strSQL);
  if(move_uploaded_file($_FILES["filUpload"]["tmp_name"],"myfile/".$_FILES["filUpload"]["name"]))      
  if(!$objQuery)
  {
  $arr['StatusID'] = "0";
  $arr['Message'] = "Cannot upload Image(s)";
  }
  else
  {
  $arr['StatusID'] = "1";
  $arr['Message'] = "Image(s) uploaded Successfully!";
  }
  mysql_close($objConnect);
  echo json_encode($arr);
  ?&gt;
  </code></pre>