title: How to Get the Id from angular app for Update and how to Get the Data from HTTP Post into the PHP file?
body: <p>I am trying to update and Add Data from my angular app to Server using PHP. 
  I am Struck at how to give the URL Id from the angular app for update and how to get the values from Http POST into php for inserting into table. This is my code: </p>
  
  <pre><code>getEmployee(id : number){
                  const eurl='http://localhost/Angular/UpdateEmployee?id='
                  const url= `${eurl}${id}`
                  return this.http.get(this.empurl)
                  .map(response =&gt; response.json().data as Data)
                  .catch(this.HandleError)
  
              }
  </code></pre>
  
  <p>This is my PHP for Update: </p>
  
  <pre><code>&lt;?php 
  $successreturn[]=array(
          "id"=&gt;"any",
         "firstname"=&gt;"any",
        "lastname"=&gt;"any",
      "dateofbirth"=&gt;"any",
      "city"=&gt;"any",
      "gender"=&gt;"any");
  header("Access-Control-Allow-Origin: *");
  $id=$_GET['id'];
  $servername="localhost";
  $username="root";
  $password="sandeepchetikam";
  $dbase="mydb";
  $conn=mysqli_connect($servername,$username,$password,$dbase);
  if (!$conn) {
      echo "Connection Problem".mysqli_connect_error($conn);
  }
  
  $sql= "SELECT * FROM Employees WHERE id='$id'";
  $result = mysqli_query($conn,$sql);
  $count = mysqli_num_rows($result);
      $value=0;
  if(!$result){
      echo "Connection Failed " .mysqli_connect_error($result);
   }
   while($row = mysqli_fetch_assoc($result)){
  
      $successreturn[$value]['id']=$row['id'];
           $successreturn[$value]['firstname']=$row['firstname'];
           $successreturn[$value]['lastname']=$row['lastname'];
           $successreturn[$value]['dateofbirth']=$row['dateofbirth'];
           $successreturn[$value]['city']=$row['city'];
           $successreturn[$value]['gender']=$row['gender'];
           $value++;
  
          };
  echo json_encode($successreturn);
  
  
  ?&gt;
  </code></pre>
  
  <p>Code for addEmployees: </p>
  
  <pre><code>addEmployees(data: Data): Observable&lt;Data&gt;{
                  let headers = new Headers({'Content-Type': 'application/json'});
                  let options = new RequestOptions({headers: headers});
                  return this.http.post(this.empurl,data,options)
                          .map(this.extractData)
                          .catch(this.HandleError)
              }
  </code></pre>
  
  <p>I would like to know how to write the link for the getEmployee() function. 
  And how to write PHP for addEmployees.</p>