File manager - Edit - /home/custbahd/scorisinternationaljunior.com/admin/activities/deactive/edit.php
Back
<?php session_start(); include_once('../db/connection.php'); if(isset($_POST['edit'])){ $id = $_POST['id']; $title = $_POST['title']; $description = $_POST['description']; $type = $_POST['type']; $teacher = $_POST['teacher']; $start = $_POST['start']; $endd = $_POST['endd']; $day = $_POST['day']; $image = $_POST['image']; $sql = "UPDATE activities SET title = '$title', description = '$description', type = '$type', teacher = '$teacher', start = '$start', endd = '$endd', day = '$day', image = '$image' WHERE id = '$id'"; //use for MySQLi OOP if($conn->query($sql)){ $_SESSION['success'] = 'Activity updated successfully'; } /////////////// //use for MySQLi Procedural // if(mysqli_query($conn, $sql)){ // $_SESSION['success'] = 'Member updated successfully'; // } /////////////// else{ $_SESSION['error'] = 'Something went wrong in updating the activity!'; } } header('location: ./'); ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Generation time: 2.2 |
proxy
|
phpinfo
|
Settings