Changed the while.php function into a do_while function.