Okay so thanks everyone for helping me out in solving this problem. Heres the problem and solution I found:
MacOS has its own built in apache server that starts automatically.
I disabled them using the following commands, the first should work for most but didn't for me, the second one did work however.
$ sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
sudo killall httpd
The next part that made it all work was placing my files in the htdocs folder of the MAMP folder.
All of that plus a little bit of configuration in PHP storm made it all work perfectly.
Thanks to all that commented.