Commit 1365bbc8 authored by Anders Damsgaard's avatar Anders Damsgaard

remove redundant html code. write to tmp file

parent 707f1868
// write form data to file
if (isset($_POST['sample_id'])) {
echo 'sample_id set';
$data = $_POST['sample_id'] . '\t';
$tmpfile = tempnam('/tmp', 'cosmo_');
$returnstatus = file_put_contents($tmpfile, $data);
if ($returnstatus === false) {
die('There was an error writing to the output file: ' . $tmpfile);
// delete temporary file
} else {
die('Invalid post data sent');
// redirect user after processing uploaded data, before any output!
header("Location: /cosmo");
<!DOCTYPE html>
<!--<html lang="en" ng-app="cosmoApp">-->
<html lang="en">
<meta http-equiv="refresh" content="0; url=/cosmo" />
<p>Click <a href="/">here</a> if your browser doesn't automatically forward
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment