Thanks for your reply. I have made the change you suggested. However, I still can't get this to work. I only get a blank screen. What is supposed to happen when the form is submitted is that the data is written to file and then input into the database from a system call. At one time, I had it writing to file and the database, but with many edits, I am now stuck again. Here is the code:
<?php
$mysql_user="dummy";
$mysql_password="dummy";
$database="dummy";
$host="dummy";
$oclc = $POST['oclc'];
$fscskey = $POST['FSCSKEY'];
$main = $POST['main'];
$libtype = $POST['libtype'];
$acadtype = $POST['acadtype'];
$acadpubpriv = $POST['acadpubpriv'];
$instname = $POST['instname'];
$libname = $POST['LIBNAME'];
$address = $POST['ADDRESS'];
$mailadd = $POST['mailadd'];
$city = $POST['CITY'];
$state = $POST['state'];
$zip = $POST['ZIP'];
$zip4 = $POST['ZIP4'];
$studentbody = $POST['pop'];
$libphone = $POST['PHONE'];
$extension = $POST['extension'];
$fax = $POST['FAX'];
$email = $POST['email'];
$web = $POST['web'];
$autocoop = $POST['autocoop'];
$othercoop = $POST['coop'];
$libdirfirst = $POST['libdirfirst'];
$libdirlast = $POST['libdirlast'];
$libdirphone = $POST['libdirphone'];
$libdirext = $POST['libdirext'];
$libdiremail = $POST['libdiremail'];
$dirjobtitle = $POST['dirjobtitle'];
$alamlsfte = $POST['alamlsfte'];
$otherlibfte = $POST['otherlibfte'];
$totlibfte = $POST['totlibfte'];
$totopexp = $POST['totopexp'];
$totvolumes = $POST['totvolumes'];
$mondayopen = $POST['mondayopen'];
$mondayclosed = $POST['mondayclosed'];
$tuesopen = $POST['tuesopen'];
$tuesclosed = $POST['tuesclosed'];
$wedopen = $POST['wedopen'];
$wedclosed = $POST['wedclosed'];
$thursopen = $POST['thursopen'];
$thursclosed = $POST['thursclosed'];
$friopen = $POST['friopen'];
$friclosed = $POST['friclosed'];
$satopen = $POST['satopen'];
$satclosed = $POST['satclosed'];
$sunopen = $POST['sunopen'];
$sunclosed = $POST['sunclosed'];
$illtoown = $POST['illtoown'];
$illtoinspec = $POST['illtoinspec'];
$illtoinstother = $POST['illtoinstother'];
$illtoout = $POST['illtoout'];
$illtototal = $POST['illtototal'];
$illfromown = $POST['illfromown'];
$illfrominspec = $POST['illfrominspec'];
$illfrominother = $POST['illfrominother'];
$illfromout = $POST['illfromout'];
$illfromtotother = $_POST['illfromtotother'];
// Establish connection and select database
mysql_connect($host,$username,$password);
mysql_select_db($database) or die( "Unable to select database");
// Write form values to file - prepare for loading to table
$writetofile = $oclc . "\t\t" . $main . "\t\t" . $libtype . "\t" . $acadtype . "\t" . "$acadpubpriv . "\t" . $instname . "\t" . $libname . "\t" . $address . "\t" . $mailadd . "\t\t\t\t" . $city . "\t" . $state . "\t" . $zip . "\t" . $zip4 . "\t" . $studentbody . "\t" . $phone . "\t" . $extension . "\t" . $fax . "\t" . $email . "\t" . $web . "\t" . $autocoop . "\t" . $othercoop . "\t" . $libdirfirst . "\t" . $libdirlast . "\t" . $libdirphone . "\t" . $libdirext . "\t" . $libdiremail . "\t" . $dirjobtitle . "\t" . $alamlsfte . "\t" . $otherlibfte . "\t" . $totlibfte . "\t" . $totopexp . "\t" . $totvolumes . "\t" . $mondayopen . "\t" . $mondayclosed . "\t" . $tuesopen . "\t" . $tuesclosed . "\t" . $wedopen . "\t" . $wedclosed . "\t" . $thursopen . "\t" . $thursclosed . "\t" . $friopen . "\t" . $friclosed . "\t" . $satopen . "\t" . $satclosed . "\t" . $sunopen . "\t" . $sunclosed . "\t" . $illtoown . "\t" . $illtoinspec . "\t" . $illtoinstother . "\t" . $illtoout . "\t" . $illtototal . "\t" . $illfromown . "\t" . $illfrominspec . "\t" . $illfrominother . "\t" . $illfromout . "\t" . $illfromtotother . "\t\t\t\t\t\t\t\t;
$filename = '/tmp/acad.txt';
$fp = fopen($filename, "w");
fwrite($fp,$writetofile);
fclose($fp);
// Load data from file to table
$mysqlcommand = '"load data infile \'/tmp/acad.txt\' into table libdev.alllibdir"';
$syscommand = "echo $mysqlcommand | mysql --user=$mysql_user --password=$mysql_password";
system($syscommand, $retval);
// execute SQL query and get result
$result=mysql_query($query) or die ("Couldn't execute query");
if (!$result) {
echo "<P>Couldn't add record!";
} else {
echo "You're record has been added";
// finished with the echo statement
}
?>