title: return data from jquery $.post
body: <p>I want to have a simple function where i can insert a sqlQuery and get a database answer in json-format like this:</p>
  
  <pre><code>  function ExecuteQuery(query){
      $.post("sql.php", { "query": query },
       function(data){ return data;  },
       "json");
     }
  </code></pre>
  
  <p>The response i get is undefined, I think i have misunderstood something quite basic but i don't know what, can anybody give me a hint?</p>