$data = new FormData(); $data->append('username', 'John'); $data->append('password', '12345');In this example, the formData() method is used to append a username and password to the data being sent to the server. Package Library: This method is part of the core PHP library, and does not require any additional packages or libraries to be installed.