// Connect to the database $db = new mysqli('localhost', 'username', 'password', 'database_name'); // Check for errors if ($db->connect_error) { die('Connection failed: '.$db->connect_error); } // Prepare the SQL statement $stmt = $db->prepare('INSERT INTO categories (name) VALUES (?)'); // Bind parameters $stmt->bind_param('s', $category_name); // Set the category name $category_name = 'Electronics'; // Execute the SQL statement $stmt->execute();In this example, we first connect to the database using the mysqli class. Then we prepare an SQL statement to insert a new category into the "categories" table. We bind the category name as a parameter and set it to "Electronics", and then we execute the statement. The package or library used in this example is the mysqli extension, which is a built-in extension in PHP for working with MySQL databases.