<?
php
// Database configuration
$servername = "localhost"; // Change this to your database host if it's different
$username = "root"; // Change this to your database username
$password = ""; // Change this to your database password
$database_name = "parii_database"; // Change this to your database name
// Create a connection to the database server
$conn = new mysqli($servername, $username, $password, $database_name);
// Check the connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
// Sample data to be inserted into the 'users' table
$username = "John Doe";
$email = "johndoe@example.com";
// SQL query to insert data into the 'users' table
$sql = "INSERT INTO users (username, email) VALUES ('$username', '$email')";
// Check if the insertion was successful
if ($conn->query($sql) === TRUE) {
echo "New record inserted successfully";
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
// Close the connection
$conn->close();
?>