-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearchAction.php
More file actions
71 lines (55 loc) · 1.75 KB
/
searchAction.php
File metadata and controls
71 lines (55 loc) · 1.75 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html PUBLIC "-W3C/DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Insertar</title>
</head>
<body>
<?Php
require("mysqli_connect.php");
require("queries.php");
#Set all selected variables
$pais1=$_POST['pais1'];
$ciudad1=$_POST['ciudad1'];
$puerto1=$_POST['puerto1'];
$pais2=$_POST['pais2'];
$ciudad2=$_POST['ciudad2'];
$puerto2=$_POST['puerto2'];
$logistica=$_POST['logistica'];
$proveedor=$_POST['proveedor'];
$contenedor=$_POST['contenedor'];
$precio=$_POST['precio'];
/*if(empty($pais1) OR empty($pais2) OR empty($ciudad1) OR empty($pais2) OR empty($ciudad2) empty($puerto2) OR empty($logistica) OR empty($proveedor) OR empty($contenedor)){
}*/
if(empty($pais1) OR empty($ciudad1) OR empty($puerto1) OR empty($pais2) OR empty($ciudad2) OR empty($puerto2) OR empty($logistica) OR empty($proveedor) OR empty($contenedor) OR empty($precio)){
echo "Usted debe llenar todos los campos";
} else {
echo "pais1= " . $pais1 . "<BR>" .
"ciudad1= " . $ciudad1 . "<BR>" .
"puerto1= " . $puerto1 . "<BR>" .
"pais2= " . $pais2 . "<BR>" .
"ciudad2= " . $ciudad2 . "<BR>" .
"puerto2= " . $puerto2 . "<BR>" .
"logistica= " . $logistica . "<BR>" .
"proveedor= " . $proveedor . "<BR>" .
"contenedor=" . $contenedor . "<BR>" .
"precio = " . $precio . "<BR>";
/*Insert confirmation
insert html with button here
if yes
insert
else
go back to insertion page
echo "Desea insertar:";
echo "$pais1";
*/
$insertQuer = "INSERT INTO todos VALUES
(NULL,
$pais1, $ciudad1, $puerto1,
$pais2, $ciudad2, $puerto2,
$logistica,
$proveedor,
$contenedor,
$precio)";
$result = mysqli_query($dbo, $insertQuer);
}
?>