You’re right. I have completed the exercise now (even if it doesn’t work) but I am pretty sure it has a bunch of things that doesn’t make it work.
I am unsure even about applying but it’s just an internship (maybe I am underestimating an internship?) and it said that it didn’t require any experience, it only required my diploma .
I didn’t expect them to ask questions related to the back-end actually.

I have never done anything like that at school honestly, we only used PHP with stuff related with mySQL. Also, I have been working a lot and focusing only on the front-end in the last months. So I did it all using external resources. I only knew how to get a value using post with a form. They gave me the choice to only do one of the exercises so I’ll go for this one because it passed too much time since they sent me the e-mail.

Let me know what you think, because I am probably wrong about everything.