How can HTML input be prevented in a guestbook to avoid server manipulation?

To prevent HTML input in a guestbook and avoid server manipulation, you can use PHP to sanitize the user input by stripping any HTML tags from the input before storing it in the database. This can be done using the strip_tags() function in PHP.

// Sanitize user input to prevent HTML input
$guestbook_entry = strip_tags($_POST['guestbook_entry']);

// Store sanitized input in the database
// Add your database connection and query here