<?php session_start();
require 'script_php/conexao.php'; ?>

<!DOCTYPE html>
<html>
<head>

<?php include_once 'head.html' ?>

<title></title>
</head>

<body>

<?php include_once 'header.php'; ?>


<section class="ordem">
    <h4>Ordem Orçamentária</h4>

    <p></p>

<section>

<?php

$result = "SELECT * FROM ordem ";

$resultado = mysqli_query($conexao, $result);

while($linha = mysqli_fetch_array($resultado)){

$loja = $linha['loja'];
$id = $linha['id'];

?>

<?php if ($loja == "matriz") { ?>
 <form method="post" action="script_php/orcamentoalterar.php">        
           MATRIZ:  

          <input type="text" name="valor" placeholder=""> 
          <input type="hidden" name="id" value="<?php echo $id;?>">

          <input type="submit" value="alterar" class="btn btn-warning">

          <?php if($loja == "matriz"){echo $linha['valor']; } ?>
</form>

<?php } ?>

      <p></p>

<?php if ($loja == "loja02") { ?>

<form method="post" action="script_php/orcamentoalterar.php"> 

           LOJA 02:  

          <input type="text" name="valor" placeholder=""> 
          <input type="hidden" name="id" value="<?php echo $id;?>">

          <input type="submit" value="alterar" class="btn btn-warning">
          
          <?php if($loja == "loja02"){echo $linha['valor']; } ?>     
        
      </form>

<?php } ?>

<p></p>


<?php if ($loja == "loja03") { ?>
 
 <form method="post" action="script_php/orcamentoalterar.php">

           LOJA 03:  

          <input type="text" name="valor" placeholder=""> 
          <input type="hidden" name="id" value="<?php echo $id;?>">

          <input type="submit" value="alterar" class="btn btn-warning">
          <?php if($loja == "loja03"){echo $linha['valor']; } ?>     
        
      </form>

<?php } ?>

<p></p>

<?php if ($loja == "loja04") { ?>

 <form method="post" action="script_php/orcamentoalterar.php">

           LOJA 04:  

          <input type="text" name="valor" placeholder=""> 
          <input type="hidden" name="id" value="<?php echo $id;?>">

          <input type="submit" value="alterar" class="btn btn-warning">
          <?php if($loja == "loja04"){echo $linha['valor']; } ?>     
        
      </form>

<?php } ?>

<p></p>

<?php if ($loja == "loja05") { ?>

 <form method="post" action="script_php/orcamentoalterar.php">        

           LOJA 05:  

          <input type="text" name="valor" placeholder=""> 
          <input type="hidden" name="id" value="<?php echo $id;?>">

          <input type="submit" value="alterar" class="btn btn-warning">
          <?php if($loja == "loja05"){echo $linha['valor']; } ?>     
        
      </form>

<?php } ?>

<p></p>

<?php }?>

 			 </div>
		</div>
	</div>
</div>

</section>


<?php include_once 'footer.php' ?>