// Connect to database $servername = "localhost"; $username = "username"; $password = "password"; $dbname = "myDB"; // sample article data $title = "Sample Article"; $content = "This is a sample article."; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // if connection is successful if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } // prepare and bind $stmt = $conn->prepare("INSERT INTO article (title, content) VALUES (?, ?)"); $stmt->bind_param("ss", $title, $content); // execute and close $stmt->execute(); $stmt->close(); $conn->close();This code connects to a database and stores a sample article in it. The `prepare()` function prepares the SQL statement by binding the parameters with a question mark to prevent SQL injection. The `bind_param()` function sets the values of the parameters before executing the statement with the `execute()` function. Finally, it closes the statement and connection to the database with `close()`. The `mysqli` extension is used in this example. This extension is a package library that enables users to interact with databases using MySQLi. It is one of the most common database connectivity libraries used in PHP.