Hello every one!
I used php environment and sql workbench i encountered Error:
INSERT INTO info (Lname, Mname, Birthday, birthplace) VALUES ('', '', '','')
Table 'test.info' doesn't exist. But the database connection is ok
Here some code
<?php
$host = "localhost";
$username = "root";
$password = "migs&daisy";
$dbname = "test";
// Create connection
$conn = mysqli_connect($host, $username, $password, $dbname);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
$sql = "INSERT INTO info (Lname, Mname, Birthday, birthplace)
VALUES ('$Lname', '$Mname', '$Birthday','$Birthplace')";
if (mysqli_query($conn, $sql)) {
echo "New record created successfully";
} else {
echo "Error: " . $sql . "<br>" . mysqli_error($conn);
}
mysqli_close($conn);
?>