无法在xampp服务器上使用msqli在数据库中插入数据

时间:2018-03-25 16:07:16

标签: php database mysqli phpmyadmin xampp

面对在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");
        }

0 个答案:

没有答案