How can ini_set() be used to prevent the automatic insertion of PHPSESSID in a form?

When PHP sessions are enabled, PHP automatically appends the PHPSESSID to URLs and form actions. This behavior can sometimes lead to security vulnerabilities. To prevent the automatic insertion of PHPSESSID in a form, you can use the ini_set() function to disable URL-based sessions.

<?php
// Disable URL-based sessions
ini_set('session.use_trans_sid', false);

// Start the session
session_start();
?>