File manager - Edit - /home/custbahd/scorisinternationaljunior.com/admin/contact/edit.php
Back
<?php session_start(); include_once('db/connection.php'); if(isset($_POST['edit'])){ $id = $_POST['id']; $title = $_POST['title']; $description = $_POST['description']; $teacher = $_POST['teacher']; $start = $_POST['start']; $endd = $_POST['endd']; $day = $_POST['day']; $image = $_POST['image']; $sql = "UPDATE classes SET title = '$title', description = '$description', teacher = '$teacher', start = '$start', endd = '$endd', day = '$day', image = '$image' WHERE id = '$id'"; //use for MySQLi OOP if($conn->query($sql)){ $_SESSION['success'] = 'Class 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 class!'; } } else{ $_SESSION['error'] = 'Select a class to edit first!'; } header('location: index.php'); ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Generation time: 2.9 |
proxy
|
phpinfo
|
Settings