As simple in theory as it sounds I\'ve done a fair amount of research and am having trouble figuring this out.
How can I check if a MySQL table exists and if it does
";
$sql = "CREATE TABLE user(
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255)NOT NULL,
email VARCHAR(255)NOT NULL,
password VARCHAR(255) NOT NULL
);";
if(mysqli_query($connection,$sql)) {
echo "Created user table";
} else{
echo "User table already exists";
}
} else {
echo "error : DB isnot connected";
} ?>