PHP如果我点击我的按钮我想将值发送到数据库

时间:2017-03-27 19:20:33

标签: php sql database

if (isset($_POST['true']) || isset($_POST['false'])) {
                    $sql = "SELECT * FROM score_user";
$result = $conn->query($sql);
        $sql = "INSERT INTO score_user (uGekozen)
VALUES ('T')";
$result = mysqli_query($conn, $sql);

当我点击按钮true或false时,我想将T发送到我的score_user

1 个答案:

答案 0 :(得分:0)

if (isset($_POST['true']) || isset($_POST['false'])) {
$sql = "INSERT INTO score_user(uGekozen) VALUES ('T')";
$result =  $conn->query($sql);