The INSERT command is used to add data to MySQL:
INSERT INTO table_name (column1, column2, column3) VALUES ( value1, value2, value3)
Add data to the database function example:
$conn = mysqli_connect("localhost", "root", "password", "testdb"); if (!$conn) { die("Error: " . mysqli_connect_error()); } $sql = "INSERT INTO Users (name, surname, age) VALUES ('Stiven', 'Sigal' 57)"; if(mysqli_query($conn, $sql)){ echo "User added"; } else{ echo "Error: " . mysqli_error($conn); } mysqli_close($conn); ?>