initial commit
This commit is contained in:
68
servicos/cad_ser.php
Normal file
68
servicos/cad_ser.php
Normal file
@ -0,0 +1,68 @@
|
||||
<?php
|
||||
if (session_status() !== PHP_SESSION_ACTIVE){
|
||||
session_start();
|
||||
}
|
||||
include('../menu.php');
|
||||
include("../conexao.php");
|
||||
?>
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title> Cadastro de serviços </title>
|
||||
<link rel="stylesheet" href="../css/menu.css">
|
||||
<link rel="stylesheet" href="../css/forms.css">
|
||||
<link rel="stylesheet" href="../css/article.css">
|
||||
<link rel="stylesheet" href="../css/input.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
echo $nav;
|
||||
?>
|
||||
<article>
|
||||
<section class='center'>
|
||||
<a href="index.php">Listar</a>
|
||||
<?php if(isset($_SESSION['msg'])){?>
|
||||
<div class="msg">
|
||||
<?php echo $_SESSION['msg'];
|
||||
unset($_SESSION['msg']);?>
|
||||
</div>
|
||||
<?php }?>
|
||||
<p><h1> Serviços - inclusão</h1></p>
|
||||
<form method="POST" action="inc_ser.php">
|
||||
<p> Nome: <input type="text" name="nome" required>
|
||||
<label> Categoria: </label>
|
||||
<select name="id_categoria">
|
||||
<?php
|
||||
$query= 'SELECT * from categoria ORDER BY categoria;';
|
||||
$resu = mysqli_query($con,$query) or die(mysqli_connect_error());
|
||||
while ($reg = mysqli_fetch_array($resu)){
|
||||
?>
|
||||
<option value="<?php echo $reg['id'];?>"> <?php echo $reg['categoria'];?> </option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<label> Prestador: </label>
|
||||
<select name="id_prestador">
|
||||
<option value="NULL">Nenhum</option>
|
||||
<?php
|
||||
$query= 'SELECT * from prestadores ORDER BY nome;';
|
||||
$resu = mysqli_query($con,$query) or die(mysqli_connect_error());
|
||||
while ($reg = mysqli_fetch_array($resu)){
|
||||
?>
|
||||
<option value="<?php echo $reg['id'];?>"> <?php echo $reg['nome'];?> </option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<table class='input'>
|
||||
<td><input class='buttons' type="submit" value="Enviar"></td>
|
||||
<td><input class='buttons' type="reset" value="Limpar"></td>
|
||||
</table>
|
||||
</form>
|
||||
</section>
|
||||
</article>
|
||||
<?php echo $footer;?>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user