initial commit
This commit is contained in:
62
servicos/edit_ser.php
Normal file
62
servicos/edit_ser.php
Normal file
@ -0,0 +1,62 @@
|
||||
<?php
|
||||
session_start();
|
||||
include_once("../conexao.php");
|
||||
$id = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT);
|
||||
$result = "SELECT * FROM servicos WHERE id = '$id'";
|
||||
$resultado = mysqli_query($con, $result);
|
||||
$row = mysqli_fetch_assoc($resultado);
|
||||
include('../menu.php');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="pt-br">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Editar 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 }?>
|
||||
<h1>Alteração - Serviços</h1>
|
||||
<form method="POST" action="proc_edit_ser.php">
|
||||
<input type="hidden" name="id" value="<?php echo $row['id']; ?>">
|
||||
|
||||
<label>Serviço: </label>
|
||||
<input type="text" name="nome" placeholder="Digite o serviço" value="<?php echo $row['servico']; ?>"><br><br>
|
||||
|
||||
<label> Prestador: </label>
|
||||
<select name="id_prestador">
|
||||
<?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="Salvar"></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