Update write.php