-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodigo.html.php
More file actions
57 lines (52 loc) · 1.71 KB
/
Copy pathcodigo.html.php
File metadata and controls
57 lines (52 loc) · 1.71 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<h1 align="center">Comidas Rapidas XYZ</h1><br>
<h2 align="center">Se venden Hamburguesas, perros, salchipapapa y pizza.</h2><br>
<h2 align="center">FACTURA</h2><br>
<link rel="stylesheet" href="style.css">
<div id="factura">
<?php
$nombre = $_POST['nombre'];
$direccion = $_POST['direccion'];
$telefono = $_POST['telefono'];
$correo = $_POST['correo'];
$select = $_POST['select'];
echo "Comida: $select <br>
Nombre: $nombre <br>
Direccion: $direccion <br>
Telefono: $telefono <br>
Correo: $correo <br>";
$rs = 0;
$gs = 13000;
$jg = 15000;
$ag = 11000;
$pr = 5000;
$dm = 3500;
if ($_REQUEST['bebida'] == "gaseosa") {
$rs += $gs;
echo "Gaseosa: $$gs";
}else if ($_REQUEST['bebida'] == "jugo"){
$rs += $jg;
echo "Jugo: $$jg";
}else if ($_REQUEST['bebida'] == "agua"){
$rs += $ag;
echo "Agua o sin bebida: $$ag";
}else if ($_REQUEST['bebida'] == " "){
echo " ";
}
if (isset($_REQUEST['porcion'])){
$rs+= $pr;
echo "<br>Porción de papa: $$pr";
}
if (isset($_REQUEST['domicilio'])){
$rs += $dm;
echo "<br>Domicilio: $$dm";
}
if ($_REQUEST['operacion'] == "efectivo"){
echo "<br>El total de su compra es de: $$rs";
}else if ($_REQUEST['operacion'] == "tarjeta"){
$rsf = 0.03*$rs;
$rs += $rsf;
echo "<br>El total de su compra mas el 3% es de: $$rs";
}
?>
</div>
<h2 align="center">Gracias por su compra :D</h2><br>