Code: Select all
<?php
$f = addslashes($_POST['firstname']);
$m = addslashes($_POST['middlename']);
$l = addslashes($_POST['lastname']);
date_default_timezone_set ("America/Chicago");
$d = date("mdY-Hi");
$_SESSION['clinician'] = $f.$m.$l."_".$d;
session_start();
$first = addslashes($_POST['contact_first']);
$middle = addslashes($_POST['contact_middle']);
$last = addslashes($_POST['contact_last']);
$_SESSION['patient'] = $first.$middle.$last."_".$d;
if(isset($_POST['Submit'])){
$name = ''.$_POST['contact_first'].''.$_POST['contact_middle'].''.$_POST['contact_last'].''.date('mdY-Hi').'';
$filename = "formfiles/".$name.".csv";
$csv_output = '"'.$_POST['missed_aptDate'].'","'.$_POST['missed_aptTime'].'","'.$_POST['missed_aptTimeAMPM'].'","'.$_POST['missed_therapyType'].'","'.$_POST['missed_comments'].'"';
$name = '"'.$_POST['contact_first'].''.$_POST['contact_middle'].''.$_POST['contact_last'].''.date('mdY-Hi').'"';
$handle = fopen($filename, 'w+');
fwrite($handle, $csv_output);
fclose($handle);
exit;
set_msg('Contact Updated');
$redirect = "sigcapture/missedvisit/employee/capture.php";
header('Location: '.$redirect); die;
}
?>Code: Select all
$filename = "C:\formfiles\".$name.".csv";