title: update image profile with jquery
body: <p>Well what I want to do is to update image profile picture of the user with jquery from database but it does not pull out the source of image from db.please tell me where I'm wrong.</p>
  
  <p>here is my code</p>
  
  <pre><code>include('../inc/config.inc.php');
  $userSession = @$_SESSION["utente"];
      $verificaPic = mysqli_query($db,"SELECT pic_profilo FROM users WHERE username='$userSession'");
      $row_pic = mysqli_fetch_array($verificaPic, MYSQLI_ASSOC);
          $pic = $row_pic["pic_profilo"];
  
          if($row_pic["pic_profilo"] !== ""){
              echo "&lt;img src='$pic' class='img-polaroid'&gt;";
          }else{
              echo '&lt;img src="img/defaultuser.png" class="img-polaroid"&gt;';
          }
  </code></pre>
  
  <p>and this is my jquery call</p>
  
  <pre><code>   JQ(function($) {
      setInterval(function() {
          $.get("/ajax/DataProfilo.php",
             function(data) {
               $("#picprofilo").html(data); //  2pm
             });
         }, 100);//1000-1 sec 
  });
  </code></pre>