-
Notifications
You must be signed in to change notification settings - Fork 0
/
RegistrarModelo.php
29 lines (29 loc) · 1.16 KB
/
RegistrarModelo.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Registrar Modelo</title>
<?php
$page="RegistrarModelo"; include("Header.php");
$dbconn = pg_connect("host=159.89.34.186 dbname=aeropuerto user=postgres password=papitopiernaslargas69");
if($dbconn){
if(isset($_POST['modelo'])){
pg_query_params($dbconn,"SELECT addmodelo($1,$2,$3)",array($_REQUEST['num'],$_REQUEST['capacidad'],$_REQUEST['peso']));
echo("<script>alert('Modelo Creado!');</script>");
}
}
?>
</head>
<body>
<form class="form_base" action="RegistrarModelo.php" method="POST">
<h1>Registrar Modelo De Aviones</h1>
<label>Número De Modelo</label>
<input type="text" name="num" required="required" pattern="[0-9].{0,}" placeholder="Número De Modelo">
<label>Capacidad</label>
<input type="text" name="capacidad" required="required" pattern="[0-9].{0,}" placeholder="Capacidad">
<label>Peso</label>
<input type="text" name="peso" required="required" pattern="[0-9].{0,}" placeholder="Peso">
<input type="submit" name="modelo" value="Registrar">
</form>
</body>
</html>