-
Notifications
You must be signed in to change notification settings - Fork 0
/
EliminarModelo.php
34 lines (32 loc) · 1.11 KB
/
EliminarModelo.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Eliminar Modelo</title>
<?php $page='EliminarModelo'; 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['eliminarM'])){
print_r($_REQUEST['eliminar']);
pg_query_params($dbconn,"SELECT deletemodelo($1)",array($_REQUEST['eliminar']));
echo("<script>alert('Modelo Eliminado!');</script>");
}
$result = pg_query($dbconn,"SELECT * FROM Modelo");
foreach (pg_fetch_all($result) as $row) {
$combobit .="<option value='".$row['no_modelo']."'>".$row['no_modelo']."</option>";
}
pg_close($dbconn);
}
?>
<form class="form_base" method="POST">
<h1>¿Cual Modelo Quiere Eliminar?</h1>
<select name = 'eliminar'>
<?php echo($combobit)?>
</select>
<input type="submit", name="eliminarM", value="Eliminar">
</form>
</body>
</html>