Nesting a <button> inside an achor <a> is not valid html syntax because it can't tell which one was clicked. Also the anchor has an href different than '#' so it's just redirecting you to probleme.php?id=1&category=g. You can modify your code using as follows (not tested):