File manager - Edit - /home/asiatechinc/public_html/asiatechinc-websites/dhyeyaprakashan.com/admin/testing_update.php
Back
<?php $conn = mysqli_connect("localhost","asiatechinc_dhyeyaprakashan", "dhyeyaprakashan@321","asiatechinc_dhyeyaprakashan"); if(isset($_POST['user_update_button'])){ $name = $_POST['name']; $email = $_POST['email']; $mobile = $_POST['mobile']; $city = $_POST['city']; $address = $_POST['address']; $user_id = $_POST['user_id']; $update = mysqli_query($conn,"UPDATE `user` SET `name`='$name',`email`='$email',`mobile`='$mobile',`city`='$city',`address`='$address' WHERE id='".$user_id."'"); if($update){ echo "1"; }else{ echo "Something is wrong"; } } if(isset($_POST['allsearch'])){ $username = $_POST['username']; $email = $_POST['email']; $mobile = $_POST['mobile']; $search = mysqli_query($conn,"SELECT * FROM `user` where name LIKE '".$username."%' && email LIKE '".$email."%' && mobile LIKE '".$mobile."%' order by id desc"); $searching = mysqli_num_rows(mysqli_query($conn,"SELECT * FROM `user` where name LIKE '".$username."%' && email LIKE '".$email."%' && mobile LIKE '".$mobile."%' order by id desc")); if($searching>0){ ?> <table class="table table-bordered table-striped table-condensed" id="tbl"> <thead> <tr> <th>#</th> <th>Name</th> <th>Email</th> <th>Mobile No</th> <th>City</th> <th>Address</th> <th colspan = "2">Action</th> </tr> </thead> <tbody> <?php $count = 1; while($selectuserresult = mysqli_fetch_assoc($search)){ echo '<tr class= "delete_id" id="respond_'.$selectuserresult['id'].'"> <td>'.$count.'</td> <td>'.$selectuserresult['name'].'</td> <td>'.$selectuserresult['email'].'</td> <td>'.$selectuserresult['mobile'].'</td> <td>'.$selectuserresult['city'].'</td> <td>'.$selectuserresult['address'].'</td> <td><button type="button" class="btn btn-success" data-id = "'.$selectuserresult['id'].'" data-bs-toggle="modal" data-bs-target="#exampleModal" id="update">Edit</button></td><td><button type="button" class="btn btn-danger" id="delete">Delete</button></td> </tr> '; $count++; } ?> </tbody> </table> <?php }else{ echo '<div class="alert alert-warning fade in">No Records Available In this System</div>'; } } ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings