Hi Eleni. This should help you.

I've refactored the PHP file structure to be more comprehensible to someone who doesn't know PHP.

I've separated the files called into separate, well, files. I've added a ton of comments to the PHP fxns so that you should understand what each does now. Just start reading and you should get the hang of it. I think I added all the fxns you need to get things looking like you drew up in your design.

Let me know if anything looks like gibberish.