2
I’m wondering if it’s possible to create a secondary image if the main image doesn’t exist
In case, if someone registers and does not put photo, he set a default img.
<img src="assets/images/<?= $username ?>.png" alt="" class="user-avatar-md rounded-circle">
has any possibility that I can do 2 SRC ? and when the name.png file is not found it overwrite by
<img src="assets/images/avatar-1.jpg" alt="" class="user-avatar-md rounded-circle">
all variable "$username" has value, but in the files of the site, the image may not exist, so it will return the value, example: test.png, but on the site there is no test.png, so it would be without image
– Matheus Ferreira
Wow, why did your Edit copy the solution of my answer? And even put a capenga solution.
– Sam
kkkkk, I didn’t notice. More respect for my answer. I will "desedite"
– Vinicius De Jesus
But you can see who answered first? I hadn’t even noticed your answer.
– Vinicius De Jesus