upload_bukti_process.php 880 Bytes
Newer Older
Cici committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
<?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";

30
if ($conn->query($sql) === TRUE) {
Cici committed
31 32
    echo "Record updated successfully";
} else {
33
    echo "Error updating record: " . $conn->error;
Cici committed
34
}
35
redirect('finish.php');
Cici committed
36
?>