 <p>You need to concatenate: </p> <pre><code>url: "productsType.php?id="+data, </code></pre> <p>or you can use <code>data:{}</code> option of ajax: </p> <pre><code>url: "productsType.php", data:{id:data} </code></pre>