Skip to content

Instantly share code, notes, and snippets.

@craxidile
Created July 14, 2012 23:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save craxidile/3113924 to your computer and use it in GitHub Desktop.
Save craxidile/3113924 to your computer and use it in GitHub Desktop.
<?php
$command = "NEWSTUDY .01,1,2,3,4,5 %s,%s,%s,%s,%s,%s";
$accessionNumber = date("YmdHi");
$scanDate = date("d-m-Y");
$givenName = "Chanan";
$familyName = "Gosonsaksakun";
$hn = "4596116";
$scanner = "MRI3T";
$sheetData = json_decode($_POST['sheet_data']);
$scanDate = $sheetData->scanDate;
$givenName = $sheetData->givenName;
$familyName = $sheetData->familyName;
$hn = $sheetData->hn;
$scanner
$command = sprintf($command, $accessionNumber, $scanDate, $givenName, $familyName, $hn, $scanner);
echo $command;
require_once "database/Database.class.php";
$database = new Database();
$database->db_query_set($command);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment