RUSH JOB - Convert PHP files to JSON API

Job ID: 37526572

Budget: $30 – $250 USD

I have to convert my php files to json api. I am not sure how to say that properly, but the below is an example of how the files are now. There are 7 or 8 php files ranging from 1 line to a little over 100. I'm hoping this is not a hard fix to convert everything.

<?php include_once('db/db.php');?>
<?php

$sdbinstsfields = $_REQUEST['sfields'] ;
if($_REQUEST["stemplate"] == "sales") {

mysqli_query($conn,"UPDATE sales
SET fields = '".strtolower($sdbinstsfields)."'
WHERE id = 1");
}

if($_REQUEST["stemplate"] == "service") {

mysqli_query($conn,"UPDATE service
SET fields = '".strtolower($sdbinstsfields)."'
WHERE id = 1");
}


if($_REQUEST["stemplate"] == "customer") {

mysqli_query($conn,"UPDATE customer
SET fields = '".strtolower($sdbinstsfields)."'
WHERE id = 1");
}

?>
<?php

$src = $_FILES['sfile']['tmp_name'];
$filename = $_FILES['sfile']['name'];
$output_dir = "uploads/".$filename;
if (move_uploaded_file($src, $output_dir )) {
Related categories: PHP XML Software Architecture MySQL JSON