New records created successfully
Here is the code for accessing the database and display the information.
<?php $servername = "localhost"; $username = "username"; $password = "password"; $dbname = "myDB"; // Create connection $conn = mysqli_connect($servername, $username, $password, $dbname); // Check connection if (!$conn) { die("Connection failed: " . mysqli_connect_error()); } $sql = "INSERT INTO MyGuests (firstname, lastname, email) VALUES ('Bob', 'Marley', 'bobmarley@example.com');"; $sql .= "INSERT INTO MyGuests (firstname, lastname, email) VALUES ('Rita', 'Marley', 'ritamarley@example.com');"; $sql .= "INSERT INTO MyGuests (firstname, lastname, email) VALUES ('Peter', 'Tosh', 'petertosh@example.com')"; if (mysqli_multi_query($conn, $sql)) { echo "New records created successfully"; } else { echo "Error: " . $sql . "<br>" . mysqli_error($conn); } mysqli_close($conn); ?>