I have resorted to using a forum after 2 days of head scratching. What I need is some script to monitor the output of a php file that outputs "yes" or "no" depending on weather it is your turn in a multiplayer game. I would like it to just check every few seconds (in order to not crash the server) if it has changed. While the PHP file is showing "yes" I want it to show some buttons to make a move and when it is showing "no" for it to just say something like "enemy's turn". I hear that this kind of thing could be achieved with jQuery and AJAX but I have never used JavaScript or AJAX before so that's why I've come here for help.

I already feel like I'm making a big ask but if you don't mind I would also like a way of submitting your move to a php file to make the move (submitting something to MySql)

I would really appreciate an answer to both however the first enquiry I consider a priority