Created
November 20, 2020 14:31
-
-
Save sinyo1015/eba9653314997e7bda842e122856c11d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$connection = mysqli_connect("localhost", "root", "", "tb_apalah"); | |
//Ambil Status | |
$user = "1"; | |
$query2 = mysqli_query($connection, "SELECT status FROM tbnya WHERE id_user = '$user'"); | |
$result = mysqli_fetch_row($query2); | |
//Ambil status | |
$hasil = $result['status']; | |
//Update Status | |
$user = $_POST['user_id']; | |
$status = $_POST['status'];//Anggap 0 masih dp, 1 masih belum lunas, dan 2 lunas | |
$sql = mysqli_query($connection, "UPDATE tbnya SET status = '$status' WHERE id_user = '$user'"); | |
Author
sinyo1015
commented
Nov 20, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment