-
Notifications
You must be signed in to change notification settings - Fork 0
/
EliminarAvion.php
33 lines (32 loc) · 1.09 KB
/
EliminarAvion.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Eliminar Avion</title>
<?php $page='EliminarAvion'; Include('Header.php');?>
</head>
<body>
<?php
$dbconn = pg_connect("host=159.89.34.186 dbname=aeropuerto user=postgres password=papitopiernaslargas69");
if($dbconn){
if(isset($_POST['eliminarA'])){
echo $_REQUEST['eliminar'];
pg_query_params($dbconn,"SELECT deleteavion($1)",array($_REQUEST['eliminar']));
echo("<script>alert('Avion Eliminado!');</script>");
}
$result = pg_query($dbconn,"SELECT no_registro FROM Avion");
foreach (pg_fetch_all($result) as $row) {
$combobit .="<option value='".$row['no_registro']."'>".$row['no_registro']."</option>";
}
pg_close($dbconn);
}
?>
<form class="form_base" method="POST">
<h1>¿Cual Avion Quiere Eliminar?</h1>
<select name = 'eliminar'>
<?php echo($combobit)?>
</select>
<input type="submit", name="eliminarA", value="Eliminar">
</form>
</body>
</html>