function write (){
$file = 'people.txt';
try {
$current = file_get_contents($file); // Open the file to get existing content
$current .= "John Smith\n"; // Append a new person to the file
file_put_contents($file, $current); // Write the contents back to the file
return true;
} catch (Exception $e) {
return false;
}
}