-
Notifications
You must be signed in to change notification settings - Fork 0
/
payment.php
executable file
·40 lines (40 loc) · 1.6 KB
/
payment.php
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
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Plaćanje</title>
<link rel="stylesheet" href="css/design.css">
</head>
<body>
<center>
<div class="user-form">
<h1>Odaberite način plaćanja</h1>
<div>
<form method="post">
<label for="nacinplacanja">Vrsta plaćanja: </label><br>
<select name="nacinplacanja">
<option value="nis">Odaberite...</option>
<option value="kartica">Kartica</option>
<option value="paypal">Paypal</option>
<option value="kripto">Kriptovalute</option>
</select>
<input type="text" name="izvorplacanja" id="form-input" placeholder="Adresa/kartica/izvor plaćanja">
<br><button type="submit" id="submit-btn" name="submit">PLATI</button>
</form>
</div>
</div>
</center>
<?php
session_start();
if(isset($_POST['submit']) && $_POST['nacinplacanja'] != "nis" && !empty($_POST['izvorplacanja'])){
unset($_SESSION['cart']);
header("location: bravo.php");
}
else if(isset($_POST['submit']) && ($_POST['nacinplacanja'] == "nis" || empty($_POST['izvorplacanja']))){
echo "<center><br><br><p style='color:tomato'>Ups... Nešto je pošlo po zlu.<br>Molimo pokušajte ponovno.</p></center>";
}
?>
</body>
</html>