I want to get the name attribute of an imagen when someone click on it. Then, with the name, I will access a MySQL database with this name as a searching parameter for the query. But I am not able to get the name of an image from php.
Can someone help me?
This is the code that I have, I suppose to have a php function in the onclick attr.
<a class="img_a" onclick="" name="xxx">
<figure class="img_figure">
<img class="img_user" src="users/xxx.png" alt="">
</figure>
</a>
<a class="img_a" onclick="" name="yyy">
<figure class="img_figure">
<img class="img_user" src="users/yyy.png" alt="">
</figure>
</a>