Update page functionality in PHP and MySQL