面对在xampp上使用php和mysqli插入数据的问题,代码是:
$Admin = "Raj";
global $connection;
$Query = "INSERT INTO $category(datetime, name, creator name)";
$Query .= "VALUES('$DateTime', '$Category', '$Admin')";
$Execute = mysqli_query($Connection,$Query);
if ($Execute) {
$_SESSION["SuccessMessage"] = "CATEGORY ADDED";
Redirect_to("categories.php");
} else {
$_SESSION["ErrorMessage"] = "CATEGORY Not ADDED";
Redirect_to("categories.php");
}