Anyone know why do I get this error? [solved]
Posted: Sun Dec 10, 2006 10:37 pm
I just had to add an @ before mysql_fetch_array($result) )
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/pablo/public_html/wap/index.php on line 12
Here's the index.php
Also, I get other error, but i don't want to show them and my site, how do i do that?
thanks
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/pablo/public_html/wap/index.php on line 12
Here's the index.php
Code: Select all
<?php
include 'config.php';
$nu = time();
$sql = ("SELECT * FROM wapupld_upload");
$result = mysql_query($sql, $db);
$enable = 0;
while($rs = mysql_fetch_array($result) ){
$uptime = $rs["dato"];
$idnm = $rs["idnm"];
$filname = $rs["filname"];
if(($nu-$uptime) >= $timeallowed) { // slet filen den er udløbet
unlink("tmpfiles/$filname");
$sql = ("DELETE FROM wapupld_upload WHERE idnm='$idnm'");
mysql_query($sql, $db);
}
}
?>
<form enctype='multipart/form-data' action='<?php echo("$urltoindex");?>/uploadfile.php' method='post'>
<table cellspacing='2' cellpadding='2' border='0'>
<tr>
<td><p>file: </font></td>
<td><input name='fil' type='file'></td>
</tr>
<tr>
<td><p>file size limit: </font></td>
<td><?php $r = $allowedsize/1024; echo("$r kb");?></td>
</tr>
<tr>
<td><input name='submit' type='submit' value='Enviar Archivo'> </td>
<td></td>
</tr>
<input type='hidden' name='from' value='tree'>
</table>
</form>
<?php checklic($license);?>thanks