Well, I've read through this thread, looked at the links, and I'm still not sure what is wrong.
Here is the form:
Code: Select all
?><h1>Add new team</h1><?
// Form for the new team entry
$url = $PHP_SELF . "?show=addTeam".$sid;
echo "<form action="" .$url."" method="post" enctype="multipart/form-data">";
echo " <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="200000">";?>
<table width="90%" cellpadding="2" cellspacing="1" border="0" class="forumline" valign="top" align="center">
<tr>
<th class="thCornerL" height="25" nowrap="nowrap" align="center">Your team's html</th>
</tr>
<tr>
<td class="row3" align="center"><input type="file" name="userfile" size="70"> (max 200KB!)</td>
</tr>
</table>
<br />
<div align="center"><input type="submit" name="submit" value="Submit team" /></div>
<? echo "</form>";Code: Select all
if ($userfile != "none") {
// File einlesen
$openHandle = fopen($userfile, "r");
//$text = readfile($userfile);
$readHandle = fread($openHandle, filesize($userfile));
$data = addslashes($readHandle);
$data_BIG = strtoupper($data);
?>
<p>
<b>Processing 'Add team' request</b><br /><br />
- Scanning for team name: <b>
<? $team_name = getTeamName($data_BIG, $data);?>
<?= $team_name; ?></b><br>Code: Select all
if ($_POST['userfile'] != "none") {
// File einlesen
$openHandle = fopen($_POST['userfile'], "r");
//$text = readfile($_POST['userfile']);
$readHandle = fread($openHandle, filesize($_POST['userfile']));
$data = addslashes($readHandle);
$data_BIG = strtoupper($data);
?>
<p>
<b>Processing 'Add team' request</b><br /><br />
- Scanning for team name: <b>
<? $team_name = getTeamName($data_BIG, $data);?>
<?= $team_name; ?></b><br>I'm using version 4.1.2. Can anyone help me read my user's files? Thanks a bunch in advance for any and all help. I realize that I'm not using version 4.2 or up, but since the variable is blank, I just cannot figure out why its not passing through. Sorry if I've posted this to the wrong thread.
Galak