WLHosting
04-18-2007, 02:08 PM
I have created a "portal" that holds several forms that the results later get processed into pdf files. When I use a form on the page I get a prompt that says: "No input file specified". The strange part about it is that I can press enter in the single text field in the form and it processes. Also if I press the lookup submit button it brings up the no input file then button again it works.
The code listed below is being included in a /eForms/viewForm.php file.
<script type="text/javascript" src="js/httpRequest.js"></script>
<script type="text/javascript" src="js/3.js"></script>
<div class="page" page="1" title="Patient Weight Log">
<h2 style="text-align: center;">Patient Weight Log</h2><br />
Please Insert Patient ID below to lookup/enter weights.<br />
<form action="viewForm.php" method="GET">
<input type="hidden" name="form" value="3">
<strong>Patient ID:</strong> <input type="text" name="PatID" id="PatID" size="4"> <input type="submit" value="Lookup"><p /><br />
</form>
<?php
echo '<form action="/eForms/forms/3/process.php" target="final" method="POST" class="data"><input type="hidden" name="PatID" value="'.$_GET['PatID'].'">';
require('includes/functions.php');
$PatID = ereg_replace('[^0-9]', '', $_GET['PatID']);
if($PatID) {
require('includes/configSQL1.php');
$sql = mssql_query("SELECT RTRIM(Patient.LastName) + ', ' + RTRIM(Patient.FirstName) AS PatientName, Patient.HomePhone FROM Patient WHERE PatID = '$PatID'", $db2);
$info = mssql_fetch_object($sql);
if($info) {
echo '<div style="width: 600px">
<li style="list-style: none; margin: 0; width: 65%; float: left;"><strong>Patient Name:</strong> '.$info->PatientName;
echo '</li>
<li style="list-style: none; margin: 0; width: 35%; float: right;"><strong>Phone:</strong> '.parsePhone($info->HomePhone).'</li>';
$sql = mssql_query("SELECT Physician.PhysicianID, Physician.LastName, Physician.FirstName, Physician.MI, Physician.WorkPhone FROM PatPhysician_v2 INNER JOIN Physician ON PatPhysician_v2.PhysicianID = Physician.PhysicianID WHERE (PatPhysician_v2.PatID = '$PatID')", $db2);
while($info = mssql_fetch_object($sql)) {
echo '<li style="list-style: none; margin: 0; width: 65%; float: left;"><strong>Physician Name:</strong> '.$info->LastName.', '.$info->FirstName.($info->MI ? ' '.$info->MI : '').'</li>
<li style="list-style: none; margin: 0; width: 35%; float: right;"><strong>Phone:</strong> '.parsePhone($info->WorkPhone).'</li>';
}
echo '</div>';
mssql_close($db2);
?>
<p /><br />
<table>
<tr>
<td>Date</td>
<td><input type="text" name="DateRecorded" id="DateRecorded" size="8" value="<?php echo date('m/d/Y'); ?>"> mm/dd/YYYY</td>
</tr>
<tr>
<td>Weight</td>
<td><input type="text" name="Weight" id="Weight" size="5"><select name="WeightStandard"><option value="lb">Pounds (lb)</option><option value="kg">Kilograms (kg)</option></select></td>
</tr>
<tr>
<td>Comments</td>
<td><textarea rows="4" cols="50" name="Comments"></textarea></td>
</tr>
</table>
<input type="submit" value="Submit">
<p /><br />
<?php
$sql = mysql_query("SELECT * FROM form3 WHERE PatID = '$PatID'");
if(mysql_num_rows($sql)) {
echo '<h3>Previous Records</h3>
<table border="1">
<tr>
<td style="text-align: center">Date</td>
<td width="90" style="text-align: center">Weight (lb)
<td style="text-align: center">Comments</td>
</tr>';
while($info = mysql_fetch_object($sql)) {
echo '<tr>
<td style="text-align: center">'.date('m/d/Y', $info->DateRecorded).'</td>
<td style="text-align: center">'.$info->Weight.'</td>
<td>'.$info->Comments.'</td>
</tr>';
$weights[] = $info->Weight;
}
echo '</table><br />';
$AverageWeight = round((array_sum($weights) / count($weights)), 3);
echo 'Avg Weight: '.$AverageWeight.' ';
sort($weights);
echo 'Lowest: '.$weights[0].' ';
rsort($weights);
echo 'Highest: '.$weights[0];
echo '<p /><br /><form action="/eForms/forms/3/process.php?ShowOnly=1" target="final" method="POST" name="form" class="data">
<input type="hidden" name="PatID" value="'.$_GET['PatID'].'"><input type="submit" value="Download Report"></form>';
}
?>
</div>
</form>
<div class="final" style="display: none" page="2" title="Preview">
<div style="width: 100%; text-align: center;" id="finishTools"></div>
<iframe style="width: 98%; height: 90%; margin: 0; padding: 0;" frameborder="0" name="final"></iframe>
</div>
<?php
} else {
echo 'No Patient Found';
}
}
?>
Any suggestions?
The code listed below is being included in a /eForms/viewForm.php file.
<script type="text/javascript" src="js/httpRequest.js"></script>
<script type="text/javascript" src="js/3.js"></script>
<div class="page" page="1" title="Patient Weight Log">
<h2 style="text-align: center;">Patient Weight Log</h2><br />
Please Insert Patient ID below to lookup/enter weights.<br />
<form action="viewForm.php" method="GET">
<input type="hidden" name="form" value="3">
<strong>Patient ID:</strong> <input type="text" name="PatID" id="PatID" size="4"> <input type="submit" value="Lookup"><p /><br />
</form>
<?php
echo '<form action="/eForms/forms/3/process.php" target="final" method="POST" class="data"><input type="hidden" name="PatID" value="'.$_GET['PatID'].'">';
require('includes/functions.php');
$PatID = ereg_replace('[^0-9]', '', $_GET['PatID']);
if($PatID) {
require('includes/configSQL1.php');
$sql = mssql_query("SELECT RTRIM(Patient.LastName) + ', ' + RTRIM(Patient.FirstName) AS PatientName, Patient.HomePhone FROM Patient WHERE PatID = '$PatID'", $db2);
$info = mssql_fetch_object($sql);
if($info) {
echo '<div style="width: 600px">
<li style="list-style: none; margin: 0; width: 65%; float: left;"><strong>Patient Name:</strong> '.$info->PatientName;
echo '</li>
<li style="list-style: none; margin: 0; width: 35%; float: right;"><strong>Phone:</strong> '.parsePhone($info->HomePhone).'</li>';
$sql = mssql_query("SELECT Physician.PhysicianID, Physician.LastName, Physician.FirstName, Physician.MI, Physician.WorkPhone FROM PatPhysician_v2 INNER JOIN Physician ON PatPhysician_v2.PhysicianID = Physician.PhysicianID WHERE (PatPhysician_v2.PatID = '$PatID')", $db2);
while($info = mssql_fetch_object($sql)) {
echo '<li style="list-style: none; margin: 0; width: 65%; float: left;"><strong>Physician Name:</strong> '.$info->LastName.', '.$info->FirstName.($info->MI ? ' '.$info->MI : '').'</li>
<li style="list-style: none; margin: 0; width: 35%; float: right;"><strong>Phone:</strong> '.parsePhone($info->WorkPhone).'</li>';
}
echo '</div>';
mssql_close($db2);
?>
<p /><br />
<table>
<tr>
<td>Date</td>
<td><input type="text" name="DateRecorded" id="DateRecorded" size="8" value="<?php echo date('m/d/Y'); ?>"> mm/dd/YYYY</td>
</tr>
<tr>
<td>Weight</td>
<td><input type="text" name="Weight" id="Weight" size="5"><select name="WeightStandard"><option value="lb">Pounds (lb)</option><option value="kg">Kilograms (kg)</option></select></td>
</tr>
<tr>
<td>Comments</td>
<td><textarea rows="4" cols="50" name="Comments"></textarea></td>
</tr>
</table>
<input type="submit" value="Submit">
<p /><br />
<?php
$sql = mysql_query("SELECT * FROM form3 WHERE PatID = '$PatID'");
if(mysql_num_rows($sql)) {
echo '<h3>Previous Records</h3>
<table border="1">
<tr>
<td style="text-align: center">Date</td>
<td width="90" style="text-align: center">Weight (lb)
<td style="text-align: center">Comments</td>
</tr>';
while($info = mysql_fetch_object($sql)) {
echo '<tr>
<td style="text-align: center">'.date('m/d/Y', $info->DateRecorded).'</td>
<td style="text-align: center">'.$info->Weight.'</td>
<td>'.$info->Comments.'</td>
</tr>';
$weights[] = $info->Weight;
}
echo '</table><br />';
$AverageWeight = round((array_sum($weights) / count($weights)), 3);
echo 'Avg Weight: '.$AverageWeight.' ';
sort($weights);
echo 'Lowest: '.$weights[0].' ';
rsort($weights);
echo 'Highest: '.$weights[0];
echo '<p /><br /><form action="/eForms/forms/3/process.php?ShowOnly=1" target="final" method="POST" name="form" class="data">
<input type="hidden" name="PatID" value="'.$_GET['PatID'].'"><input type="submit" value="Download Report"></form>';
}
?>
</div>
</form>
<div class="final" style="display: none" page="2" title="Preview">
<div style="width: 100%; text-align: center;" id="finishTools"></div>
<iframe style="width: 98%; height: 90%; margin: 0; padding: 0;" frameborder="0" name="final"></iframe>
</div>
<?php
} else {
echo 'No Patient Found';
}
}
?>
Any suggestions?
