What role does PHP play in all of this, since HTML/Javascript should suffice? Have a look at this tutorial: