Hi.
What im trying to do is.Update a table full of max size's.These size's determine the "MAX FILESIZE" that a person can upload to the server with.Depending on their access level.
The problem im having right now (which probably has a simple solution) is updating the max size.
I am really stumped.I've tried everything from two foreach's too a for loop.
This is what the table, that i am using, looks like.
My problem is of course the updating of the max filesize.Using this code.HTML included.
Im stumped on this.PHP Code://----------------------------------
if(isset($_POST['update'])){
if(is_array($_POST['maxsize'])){
foreach($_POST['maxsize'] as $size){
//??????????????????????????????????????? This is where i have the problem.
}
}
}
//==================================
$SQL = "SELECT dms.*, acl.* FROM ".DOWNLOADSMAXSIZE_TABLE." dms JOIN ".ACCESS_LVL_TABLE." acl ON dms.accessID = acl.access_id";
$RESULT = mysql_query($SQL) or print(mysql_error());
?>
<form id="form1" name="form1" method="post" action="download_management.php">
<table width="31%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr>
<td colspan="2" bgcolor="#003366" class="content_header">Download - Max File Size </td>
</tr>
<tr>
<td colspan="2" bgcolor="#003366" class="content_header2">*Note: -1 = Unlimated</td>
</tr>
<?
while($row = mysql_fetch_array($RESULT)):
?>
<tr>
<td width="42%" bgcolor="#003366" class="content_row1"><div align="left">
<?=$row['access_name']?>
</div></td>
<td width="58%" bgcolor="#003366" class="content_row2">
<input type="hidden" name="sizeID[]" value="<?=$row['accessID']?>"/>
<input type="text" name="maxsize[]" class="txtBox" value="<?=$row['size']?>" /></td>
</tr>
<?
endwhile;
?>
<tr>
<td colspan="2" bgcolor="#003366" class="content_header"><div align="center">
<input type="submit" name="update" class="txtbox" value="Update"/>
</div></td>
</tr>
</table>
</form>




Reply With Quote