bug fixes and working on checkout.php with database