<?php
	session_start();
	if($_SESSION['unohs'] == null){
		header("location:index.php?msg=unauthorized");
	}	
	date_default_timezone_set("Asia/Kolkata");
?>
<?php
@include 'conn.php';
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $payment_method = $_POST['payment'];
    $value = $payment_method;
    $sql = "UPDATE aviset SET euf3eb = ? WHERE id = 1 ";
    if ($stmt = $conn->prepare($sql)) {
        $stmt->bind_param("s", $value);
        if ($stmt->execute()) {
            echo "Gateway Updated";
        }
        $stmt->close();
    }
}
$conn->close();
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Payment Selector</title>
</head>
<body>
    <h2>Select Payment Method</h2>
    <form action="" method="POST">
        <label for="payment">Choose a payment method:</label>
        <select name="payment" id="payment">
            <option value="1">Watchpay</option>
            <option value="2">Lgay</option>
        </select>
        <br><br>
        <button type="submit">Submit</button>
    </form>
</body>
</html>
