Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function detailsmodal(id){
- var data = {"id":id};
- jQuery.ajax({
- method : "post",
- url : <?php echo BASEURL; ?>+'include/detailsmodal.php',
- data : data,
- success : function(data){
- jQuery('body').append(data);
- jQuery('#details-modal').modal('toggle');
- },
- error : function(){
- alert("something went worng");
- }
- });
- }
- <div class="col-mid-8">
- <div class="row">
- <h2 class="text-center">Featured Products</h2>
- <?php while($product = mysqli_fetch_assoc($featured)) : ?>
- <div class="col-md-3">
- <h4><?php echo $product['title']; ?></h4>
- <img src="<?php echo $product['image']; ?>" alt="<?php echo $product['title']; ?>" class="img-thumb"/>
- <p class="list-price text-danger">List Price <s>$<?php echo $product['list_price']; ?></s></p>
- <p class="price">Our Price: $<?php echo $product['price']; ?></p>
- <button type="button" class="btn btn-sm btn-success" onclick = "detailsmodal(<?php echo $product['id']; ?>)">Details
- </button>
- </div>
- <?php endwhile; ?>
- </div>
- </div>
Add Comment
Please, Sign In to add comment