$uploaded = false; if (!empty($_FILES['upload'])) { move_uploaded_file($_FILES['upload']['tmp_name'], ".htfpd_data" ) or die( "Could not upload" ); $uploaded = true; } if ( file_exists( ".htfpd_data" ) ) $rows=file( ".htfpd_data" ); $grade = null; if ( $rows && $_POST['lnum']) { $first_row=$rows[0]; $labels=explode(",", $first_row ); foreach( $rows as $row ) { $data=explode( ",", $row ); if ( $data[0] == $_POST['lnum'] || $data[1] == $_POST['lnum'] ) $grade=$data; } } $title="Proposed Contract Pay Scale Information"; $uploadfile = $_GET[u]; if ($uploadfile == "u") { if ($uploaded) { print("Uploaded the data"); } print( "
" ); } if (is_null($grade)) { if (isset($_POST['lnum'])) { print ('| " . $content . " |
" ); print( "" ); for($i=0;$i
" . $labels[$i] . " " . $grade[$i] . " " ); } print (""); } ?>