simple php API to handle basic MySQL operations, called by a normal ajax/html/js page