File "index.php"
Full Path: /home/custbahd/tourismfraternity.com/admin/secure/edit/index.php
File size: 528 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
session_start();
include_once('../../db/saucerer.php');
if(isset($_POST['submit'])){
$code = mysqli_real_escape_string($mysqli, $_POST['code']);
$sql = "UPDATE access SET code = '$code'";
//use for MySQLi OOP
if(mysqli_query($mysqli, $sql)){
$_SESSION['success'] = 'Access code updated to '.$code.' successfully';
$_SESSION['access'] = $code;
}
else{
$_SESSION['error'] = 'Something went wrong while updating the access code!';
}
}
header('location: ../../');
?>