Advertisement
alza

Untitled

Feb 29th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1.  
  2. <?php
  3.  
  4. if(isset($_POST['j'])){
  5. $j=$_POST['j'];
  6. }
  7. else{
  8. $j=1;
  9. }
  10.  
  11.  
  12.  
  13. ?>
  14. <form method="post" action="hitung.php">
  15. <div><input type="text" name="napem" class="form-control" style="width: 200px; margin-top: -30px;" placeholder="Nama Pembeli" required=""/><br />
  16. <?php
  17. for($i=1;$i<=$j;$i++){
  18. ?><div class="container">
  19. <div class="row">
  20. <div class="col-md-8"><div class="col-md-6" style="margin-bottom: 8px;">
  21. <select name="hp<?php echo $i;?>" class="form-control">
  22. <?php
  23. $query=mysql_query("select * from barang order by id DESC");
  24. while($array=mysql_fetch_array($query)){
  25. ?><option><?php echo $array['nama']; ?></option>
  26. <?php
  27. }
  28. ?>
  29. </select>
  30. </div>
  31. <div class="col-md-6">
  32. <input type='text' placeholder="Jumlah Item" name='jml<?php echo $i;?>' id="an" oninput="angka()" class="form-control" />
  33. </div>
  34. </div>
  35.  
  36.  
  37. <?php }
  38. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement