-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuscar_mapa.php
More file actions
executable file
·37 lines (30 loc) · 936 Bytes
/
buscar_mapa.php
File metadata and controls
executable file
·37 lines (30 loc) · 936 Bytes
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
<?php
$cadena = " host='localhost' port='5432' dbname='postgres' user='postgres' password='iavm2umr'";
$dbconn = pg_connect($cadena);
if (!$dbconn) {
echo "An error occurred.\n";
exit;
}
$res = $_POST['restaurant'];
$result = pg_query ($dbconn, "
SELECT mapa
FROM menjar
WHERE nom='$res'
GROUP BY mapa
");
$valor = pg_fetch_row($result);
echo <<<HTML
<iframe src=$valor[0] frameborder="0" allowfullscreen> </iframe>
<style>
iframe{
display: block;
height:100%;
width: 100%;
border-style: solid;
border-width: 2px;
border-radius: 10px;
}
</style>
HTML;
pg_close($dbconn);
?>