-
Notifications
You must be signed in to change notification settings - Fork 0
/
retirar_campo_form.php
37 lines (32 loc) · 989 Bytes
/
retirar_campo_form.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
34
35
36
37
<html>
<body>
<h2>Bloco de Notas</h2>
<h3>Retirar Campo</h3>
<?php
session_start();
include('functions.php');
echo("<h5>Sessão de {$_SESSION['nome']} </h5>");
$connection=createConnection();
$sql = "SELECT nome, typecnt FROM tipo_registo where userid = ".$_SESSION['id']." AND ativo=1";
$result = $connection->query($sql);
$rows = $result->fetchAll();
if (count($rows) == 0){
die('Operacao invalida: nao possui páginas');
}
?>
<form method="post" action="retirar_campo_form2.php">
Nome do tipo de registo: <select name = "tipo_reg_count">
<?php
foreach ($rows as $row) { ?>
<option value="<?php echo($row[typecnt]); ?> "> <?php echo($row[nome]); ?> </option>
<?php } ?>
</select>
<br><br>
<input type="submit" value="Seguinte">
</form>
<?php
buttons();
$connection->close();
?>
</body>
</html>