Guest User

settings.php

a guest
Apr 13th, 2017
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.54 KB | None | 0 0
  1. <h1>Site Settings</h1>
  2.  
  3. <div class="row">
  4.        
  5.     <div class="col-md-12">
  6.        
  7.         <?php if(isset($message)) { echo $message; } ?>
  8.                            
  9.         <?php
  10.             $q = "SELECT * FROM settings ORDER BY id ASC";
  11.             $r = mysqli_query($dbc, $q);
  12.            
  13.             while ($opened = mysqli_fetch_assoc($r)) { ?>
  14.                        
  15.                 <form class="form-inline" action="index.php?page=settings&id=<?php echo $opened['id'];?>" method="post" role = "form">
  16.                    
  17.                     <div class="form-group">
  18.                        
  19.                         <label class="sr-only" for="id">ID:</label>
  20.                         <input class="form-control" type="text" name="id" id = "id" value="<?php echo $opened['id']; ?>" placeholder="id" autocomplete="off"/>
  21.                        
  22.                     </div>
  23.                    
  24.                     <div class="form-group">
  25.                        
  26.                         <label class="sr-only" for="label">Label:</label>
  27.                         <input class="form-control" type="text" name="label" id ="lable" value="<?php echo $opened['label']; ?>" placeholder="Label" autocomplete="off" />
  28.                        
  29.                     </div>
  30.                    
  31.                     <div class="form-group">
  32.                        
  33.                         <label class="sr-only" for="value">Value:</label>
  34.                         <input class="form-control" type="text" name="value" id ="value" value="<?php echo $opened['value']; ?>" placeholder="Value" autocomplete="off" />
  35.                        
  36.                     </div>
  37.                        
  38.                        
  39.                     <button type="submit" class="btn btn-default">Save</button>
  40.                     <input type="hidden" name="submitted" vaule="1" />
  41.                    
  42.                     <input type="hidden" name="openedid" vaule="<?php echo $opened['id']; ?>" />
  43.                    
  44.                 </form>
  45.            
  46.               <?php } ?>       
  47.              
  48.     </div> <!-- END  col-md-12-->
  49.    
  50. </div> <!-- END  row-->
Add Comment
Please, Sign In to add comment