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/ezitransport/admin/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php session_start(); include("includes/config.php"); if(isset($_POST['add_career'])){ $title = $_POST['title']; $description = $_POST['description']; $query = "INSERT INTO careers (title, description) VALUES ('$title','$description')"; $query_run = mysqli_query($conn, $query); if($query_run){ $_SESSION['status'] = "Uploaded Successfully"; header('Location: view-career.php'); exit; } else { $_SESSION['status'] = "Not Uploaded"; header('Location: career.php'); exit; } } // update if(isset($_POST['update_career'])){ $id = $_POST['id']; $title = $_POST['title']; $description = $_POST['description']; // Update the department information in the database $query = "UPDATE careers SET title='$title', description='$description' WHERE id ='$id'"; $query_run = mysqli_query($conn, $query); if($query_run){ $_SESSION['status'] = "Updated Successfully"; header('Location: view-career.php'); } else { $_SESSION['status'] = "Not Updated"; header('Location: view-career.php'); } } // delete if(isset($_POST['delete_career'])){ $id = $_POST['delete_id']; $query = "DELETE FROM careers WHERE id = '$id'"; $query_run = mysqli_query($conn, $query); if($query_run){ $_SESSION['status'] = "Deleted Successfully"; header('Location: view-career.php'); } else { $_SESSION['status'] = "Not Deleted Successfully"; header('Location: view-career.php'); } } ?>