xiaodao
11-08-2006, 03:19 AM
<table width="100%" align="center" border="0" cellspacing="1" cellpadding="4">
<form action="/news/admin/organisation.php" enctype="multipart/form-data" method="post" name="" >
<tr id="cat">
<td class="tblhead" colspan="2"><b>Add Organisation</b></td>
</tr>
<tr class="firstalt" nowrap>
<td valign="top">Attachment:</td>
<td id="upid"><input class="fileinput" type="file" name="attachment1" size="30"></td>
</tr>
<tr class="secondalt" nowrap>
<td valign="top">Attachment:</td>
<td id="upid"><input class="fileinput" type="file" name="attachment2" size="30"></td>
</tr>
<tr class="firstalt" nowrap>
<td valign="top">Attachment:</td>
<td id="upid"><input class="fileinput" type="file" name="attachment3" size="30"></td>
</tr>
<tr class="secondalt" nowrap>
<td valign="top">Attachment:</td>
<td id="upid"><input class="fileinput" type="file" name="attachment4" size="30"></td>
</tr>
<tr class="firstalt" nowrap>
<td valign="top">Attachment:</td>
<td id="upid"><input class="fileinput" type="file" name="attachment5" size="30"></td>
</tr>
<input type="hidden" name="action" value="addorg">
<input type="hidden" name="id" value="2">
<tr class="tblhead">
<td colspan="2" align="center">
<input class="formbutton" accesskey="y" type="submit" name="submit" value="Submit" >
<input class="formbutton" accesskey="r" type="reset" name="" value="Reset" >
</td></tr>
</form>
</table>
above is my upload script, however when i upload, i cannot see anything
if($_POST['action']=="addorg"){
$newsid=$_POST['id'];
print_r($_FILES['attachment1']);
echo count($_FILES['attachment1']);
}
can anyone help me?
<form action="/news/admin/organisation.php" enctype="multipart/form-data" method="post" name="" >
<tr id="cat">
<td class="tblhead" colspan="2"><b>Add Organisation</b></td>
</tr>
<tr class="firstalt" nowrap>
<td valign="top">Attachment:</td>
<td id="upid"><input class="fileinput" type="file" name="attachment1" size="30"></td>
</tr>
<tr class="secondalt" nowrap>
<td valign="top">Attachment:</td>
<td id="upid"><input class="fileinput" type="file" name="attachment2" size="30"></td>
</tr>
<tr class="firstalt" nowrap>
<td valign="top">Attachment:</td>
<td id="upid"><input class="fileinput" type="file" name="attachment3" size="30"></td>
</tr>
<tr class="secondalt" nowrap>
<td valign="top">Attachment:</td>
<td id="upid"><input class="fileinput" type="file" name="attachment4" size="30"></td>
</tr>
<tr class="firstalt" nowrap>
<td valign="top">Attachment:</td>
<td id="upid"><input class="fileinput" type="file" name="attachment5" size="30"></td>
</tr>
<input type="hidden" name="action" value="addorg">
<input type="hidden" name="id" value="2">
<tr class="tblhead">
<td colspan="2" align="center">
<input class="formbutton" accesskey="y" type="submit" name="submit" value="Submit" >
<input class="formbutton" accesskey="r" type="reset" name="" value="Reset" >
</td></tr>
</form>
</table>
above is my upload script, however when i upload, i cannot see anything
if($_POST['action']=="addorg"){
$newsid=$_POST['id'];
print_r($_FILES['attachment1']);
echo count($_FILES['attachment1']);
}
can anyone help me?