Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $q=mysql_query("SELECT * FROM `warehouse` ORDER BY `id`");
- while($post=mysql_fetch_array($q)){
- if(isset($_POST['update_quantity'])){
- $quantity=mysql_real_escape_string($_POST['quantity']);
- mysql_query("UPDATE `warehouse` set `quantity`='$quantity' where `id` = '$post[id]'");
- echo "<script>location.href = 'http://restaurant.dachniki.top/warehouse.php' </script>";
- }
- ?>
- <center>
- <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
- <? echo "<font color=green><b>$post[name]</b></font>";?>
- </div>
- <form method=POST>
- <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
- <b>
- <input type="number" name="quantity" value="<?echo $post['quantity'];?>">
- </b>
- </div>
- <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
- <b>
- <input type="submit" name="update_quantity" value="Сохранить">
- </b>
- </div>
- </form>
- </center>
- <br>
- <hr>
- <?
- }
Advertisement
Add Comment
Please, Sign In to add comment