lundi 27 avril 2015

bootstrap model showing me firs row data every time ...

bootstrap model showing me same data in while loop . when i click any model it shows me first row data , how to fix this plz help me .. Here is code// $sql="SELECT * FROM tbl_store order by store_id DESC"; $result=mysqli_query($con, $sql); while($row=mysqli_fetch_array($result, MYSQLI_ASSOC)) { #code here }

Edit × Edit Store

                            <form role="form" action="editStore.php" method="POST" enctype="multipart/form-data">
                            <!-- text input -->
                            <div class="row">

                              <div class="col-md-3 col-xs-3" style="text-align:right; color:#000000;">
                                <h6>Store Name :</h6>
                                <br>
                                <h6 style="margin-bottom:40px; margin-top:-10px;">Description:</h6> 
                                <br>
                                <h6>Phone:</h6>
                                <br>
                                <h6 style="margin-top:0px;">Address:</h6>
                                <br>
                                <h6 style="margin-top:0px;">Latitude:</h6>
                                <br>
                                <h6 style="margin-top:0px;">Longitude:</h6>
                                <br>
                                <h6 style="margin-top:0px;">City:</h6>
                                <br>
                                <h6 style="margin-top:0px;">Country:</h6>
                                <br>
                                <h6 style="margin-top:0px;">Upload photo:</h6>
                                <p style="color:red;">*If you want to replace</p>
                              </div>
                              <div class="col-md-9 col-xs-9" style="text-align:left; color:#000000;">
                               <input type="text" class="input form-control" style="width:100%; margin-bottom:10px;" name="title" value="<?php echo $row['store_title']; ?>" required/> 
                              <br>
                              <textarea class="input input-group" rows="3" style="width:100%; margin-bottom:10px; padding-left:10px;" name="description" required><?php echo $row['store_description']; ?></textarea>
                              <br>

                              <input type="tel" class="form-control" style="width:100%; margin-bottom:10px;" name="phone" value="<?php echo $row['store_phone']; ?>"/>
                              <br>
                              <input type="text" class="form-control" style="width:100%; margin-bottom:10px;" name="address" value="<?php echo $row['store_address']; ?>" required/>
                              <br>
                              <div class="row">
                                <div class="col-md-6 col-sm-12 pull-left">
                                  <input type="text" class="form-control" style="width:100%; margin-bottom:10px;" max="180" min="0" step="0.00001" name="lat" value="<?php echo $row['store_lat']; ?>" required/>
                                  <input type="text" class="form-control" style="width:100%; margin-bottom:10px;" max="180" min="0" step="0.00001" name="long" value="<?php echo $row['store_long']; ?>" required/>
                                  <input type="text" class="form-control" style="width:100%; margin-bottom:10px;" name="city" value="<?php echo $row['store_city']; ?>" required/>
                                  <input type="text" class="form-control" style="width:100%; margin-bottom:10px;" name="country" value="<?php echo $row['store_country']; ?>" required/>
                                </div>
                                <div class="col-md-6 col-sm-12 pull-right">
                                  <img src="<?php echo $row['store_image'];?>" style="float:right;max-height:200px;max-width:200px;">
                                </div>
                                <input type="file"  style="margin-left:15px; width:93%;" name="photo"/>
                                <input type="hidden" name="store_id" value="<?php echo $row['store_id'];?>">
                              </div> 

                             </div>
                            </div>

                          </div> 
                          <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                            <button type="submit" class="btn btn-primary" name="submit">Save changes</button>
                          </div>
                          </form>
                        </div>
                      </div>
                    </div>




Aucun commentaire:

Enregistrer un commentaire