PHP Classes

File: uploady/admin/roles/logic/addLogic.php

Recommend this page to a friend!
  Classes of Faris AL-Otabi   Uploady PHP Upload File to MySQL   uploady/admin/roles/logic/addLogic.php   Download  
File: uploady/admin/roles/logic/addLogic.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Uploady PHP Upload File to MySQL
Store file upload details in a MySQL database
Author: By
Last change: Update of uploady/admin/roles/logic/addLogic.php
Date: 4 months ago
Size: 456 bytes
 

Contents

Class file image Download
<?php

$role
= new Uploady\Role($db, $user);

if (
$_SERVER['REQUEST_METHOD'] == 'POST') {
    if (
$auth->checkToken($_POST['csrf'], $_SESSION['csrf'])) {
        unset(
$_POST['csrf']);
        if (
$role->createRole(
           
$utils->sanitize($_POST['role_name']),
           
$utils->sanitize($_POST['size_limit'])
        )) {
           
$msg = 'yes';
        } else {
           
$msg = 'error';
        }
    } else {
       
$msg = 'csrf';
    }
}