Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- require_once(__DIR__.'/../includes/config.include.php');
- require_once(__DIR__.'/../includes/db.include.php');
- require_once(__DIR__.'/../vendor/autoload.php');
- require_once(__DIR__.'/../includes/autoloader.include.php');
- $data = [];
- $data['title'] = $_POST['title'];
- $record = new Record($Conn);
- $record->addToCrate($data);
- // if($_SESSION['user_data']) {
- // $record_data = [];
- // $record_data['cover_image'] = $_POST['cover-image'];
- // $record_data['title'] = $_POST['title'];
- // $record_data['year'] = $_POST['year'];
- // $record_data['title'] = $_POST['genre'];
- // $record_data['format'] = $_POST['format'];
- // $record_data['master_url'] = $_POST['master-url'];
- // $record = new Record($Conn);
- // $added = $record->addToCrate($record_data);
- // if($added) {
- // echo json_encode(array(
- // "success"=>true
- // ));
- // }else{
- // echo json_encode(array(
- // "success"=>false,
- // "reason"=>"Data was not received as expected."
- // ));
- // }
- // }else{
- // echo json_encode(array(
- // "success"=>false,
- // "reason"=>"User not logged in."
- // ));
- // }
Add Comment
Please, Sign In to add comment