File manager - Edit - /home/asiatechinc/public_html/asiatechinc-websites/dhyeyaprakashan.com/admin/categories.php
Back
<?php $conn = mysqli_connect("localhost","asiatechinc_dhyeyaprakashan", "dhyeyaprakashan@321","asiatechinc_dhyeyaprakashan"); $pos = $_GET['pos']; ?> <head> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous"> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script> </head> <section id="main-content"> <section class="wrapper"> <div class="row"> <div class="col-md-12"> <div id="tbl_sim_dis"> <section class="panel"> <header class="panel-heading">Add POS Category</header> <div class="panel-body"> <span id="errmsg"></span> <div id="errorinput_tax"></div> <table class="table table-bordered"> <thead> <tr> <th>Name *</th> <th>Description</th> <th>Action</th> </tr> </thead> <tbody> <tr> <td><input class="form-control" type="text" name="name" id="name" placeholder="Category Name" autocomplete="off"/> <input type="hidden" id="pos" value="<?php echo $pos; ?>"> </td> <td><textarea class="form-control" name="description" id="description" placeholder="Enter Description"></textarea></td> <td><button id="submit_pos" name="submit_pos" class="btn btn-info">Create POS</button> </tr> </tbody> </table> </div> </section> <section class="panel"> <header class="panel-heading">POS Category Added </header> <div class="panel-body"> <div id="type_9"> <div class="adv-table table-responsive"> <table class="display table table-bordered table-striped" id="dynamic-table"> <thead> <tr> <th>SR NO</th> <th>Category Name</th> <th>Category</th> <th>POS Point</th> <th>Status</th> <th>Update</th> <th>Delete</th> </tr> </thead> <tbody> <div id="showresponse"></div> <?php $categories = mysqli_query($conn,"SELECT * FROM `categories_$pos`"); $count = 1; while($result_categories = mysqli_fetch_assoc($categories)){ echo'<tr id="'.$result_categories['id'].'"> <td>'.$count.'</td> <td>'.$result_categories['name'].'</td> <td><a href="categories.php?pos='.$pos.'_'.$result_categories['id'].'">Add/View Category</a></td> <td>'.$result_categories['pos'].'</td> <td><button type="button" class="btn btn-success">Active</button></td> <td>Update</td> <td>Delete</td> </tr>'; $count++; } ?> </tbody> </table> </div> </div> </div> </section> </div> </div> </div> </section> </section> <script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script> <script> $('#submit_pos').click(function(){ var name = $('#name').val(); var description = $('#description').val(); var pos = $('#pos').val(); if(name == ''){ $('#errmsg').html('<div class="alert alert-danger" role="alert">Name Cant Be Blank</div>'); } var sendata = 'name='+name+'&description='+description+'&pos='+pos; $.ajax({ type:"post", url:"ajax/categories.php", data:sendata, success:function(response){ $("#showresponse").html(response); } }); }); </script>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings