I am trying to pass the ID of the clicked image to next page. When I developed my code, it didn\'t redirect me to the next page. When I click F12 and check the POST in network,
I think you are better off making a small form, since you want to send the user to a new page when clicking.
fetch_assoc()) ?> $('.img').click(function() { this.form.submit(); });
*Edited to reflect your current edits.