How can vorgabewerte be set in a textarea in PHP when saving to a MySQL database?

When saving user input from a textarea to a MySQL database in PHP, you can set vorgabewerte (default values) by checking if the textarea field is empty and assigning a default value if it is. This can be done using the ternary operator to set the default value if the textarea input is empty.

// Assuming $textareaInput contains the user input from the textarea
$textareaInput = isset($_POST['textarea_input']) ? $_POST['textarea_input'] : 'Default Value';

// Now you can save $textareaInput to the database
// Make sure to sanitize and validate the input before saving it to the database