upload_bukti_process.php 880 Bytes
<?php

session_start();
include_once 'functions/fungsi.php';
include_once 'connection/koneksi.php';


if (!empty($_FILES['uploaded_file'])) {
    $path = "pembayaran/";
    $path = $path . basename($_FILES['uploaded_file']['name']);
    if (move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $path)) {
        echo "The file " . basename($_FILES['uploaded_file']['name']) .
        " has been uploaded";
    } else {
        echo "There was an error uploading the file, please try again!";
    }
}
$gambar = basename($_FILES['uploaded_file']['name']);
$status = "Waiting For Confirmation";
$id = $_GET['id'];

//die($gambar);





$sql = "UPDATE pembayaran SET status='$status',gambar='$gambar' WHERE id=$id";

if ($conn->query($sql) === TRUE) {
    echo "Record updated successfully";
} else {
    echo "Error updating record: " . $conn->error;
}
redirect('finish.php');
?>