Server IP : 162.214.80.37 / Your IP : 216.73.216.83 Web Server : Apache System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : imyrqtmy ( 2189) PHP Version : 8.2.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home2/imyrqtmy/public_html/hghindustries/admin/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php session_start(); include("includes/config.php"); if(isset($_POST['add_about'])){ $about_us = $_POST['about_us']; $who_we_are = $_POST['who_we_are']; $mfd_design = $_POST['mfd_design']; $tempted_glass = $_POST['tempted_glass']; $why_choose = $_POST['why_choose']; $our_miss = $_POST['our_miss']; $our_viss = $_POST['our_viss']; $bind_to = $_POST['bind_to']; $query = "INSERT INTO abouts(about_us, who_we_are, mfd_design, tempted_glass, why_choose, our_miss, our_viss, bind_to) VALUES ('$about_us', '$who_we_are','$mfd_design', '$tempted_glass', '$why_choose', '$our_miss', '$our_viss', '$bind_to')"; $query_run = mysqli_query($conn, $query); if($query_run){ $_SESSION['status'] = "Uploaded Successfully"; header('Location: view-about.php'); exit; } else { $_SESSION['status'] = "Not Uploaded"; header('Location: about.php'); exit; } } // update if(isset($_POST['update_about'])){ $id = $_POST['id']; $about_us = $_POST['about_us']; $who_we_are = $_POST['who_we_are']; $mfd_design = $_POST['mfd_design']; $tempted_glass = $_POST['tempted_glass']; $why_choose = $_POST['why_choose']; $our_miss = $_POST['our_miss']; $our_viss = $_POST['our_viss']; $bind_to = $_POST['bind_to']; // Update the testimonial information in the database without handling images $query = "UPDATE abouts SET about_us='$about_us', who_we_are='$who_we_are', mfd_design='$mfd_design', tempted_glass='$tempted_glass', why_choose='$why_choose', our_miss='$our_miss', our_viss='$our_viss', bind_to='$bind_to' WHERE id='$id'"; $query_run = mysqli_query($conn, $query); if($query_run){ $_SESSION['status'] = "Updated Successfully"; header('Location: view-about.php'); } else { $_SESSION['status'] = "Not Updated"; header('Location: view-about.php'); } } // delete if(isset($_POST['delete_about'])){ $id = $_POST['delete_id']; // Delete the testimonial from the database $query = "DELETE FROM abouts WHERE id = '$id'"; $query_run = mysqli_query($conn, $query); if($query_run){ $_SESSION['status'] = "Deleted Successfully"; header('Location: view-about.php'); } else { $_SESSION['status'] = "Not Deleted"; header('Location: view-about.php'); } } ?>