show file delete when code not show any error
<p>i coded this php code but when i run it in localhost it shows me the files and i can delete them but when i put it in server it does not , it was working before idk what did i do wrong </p>

<p>i did some changes on the script but it is the same , i was expecting to  show me an error but nothing please help me in it</p>

<pre><code>case 'my_files';

        $sitename2 = "My Files";
$ext2 = array("jpeg", "png", "jpg", "gif", "JPG", "JPEG"); // dont change this one.
$per_page=10;
$req_user = trim($session-&gt;username);
// Let's put FROM and WHERE parts of the query into variable
$from_where="FROM upload WHERE  user_name='".$session-&gt;username."'";
// and get total number of records
$sql = "SELECT count(*) ".$from_where;

$res = mysql_query($sql) or trigger_error(mysql_error()." in ".$sql);
$row = mysql_fetch_row($res);
$total_rows = $row[0];

//let's get page number from the query string 
if (isset($_GET['page'])) $CUR_PAGE = intval($_GET['page']); else $CUR_PAGE=1;
//and calculate $start variable for the LIMIT clause
$start = abs(($CUR_PAGE-1)*$per_page);

//Let's query database for the actual data
$sql = "SELECT * $from_where ORDER BY upload_date DESC LIMIT $start,$per_page";
$res = mysql_query($sql) or trigger_error(mysql_error()." in ".$sql);
// and fill an array
while ($row=mysql_fetch_array($res)) $DATA[++$start]=$row;

//now let's form new query string without page variable
$uri = strtok($_SERVER['REQUEST_URI'],"?")."?";    
$tmpget = $_GET;
unset($tmpget['page']);
if ($tmpget) {
  $uri .= http_build_query($tmpget)."&amp;";
}    
//now we're getting total pages number and fill an array of links
$num_pages=ceil($total_rows/$per_page);
for($i=1;$i&lt;=$num_pages;$i++) $PAGES[$i]=$uri.'page='.$i;


$new_file_size = convertFileSize($row[3]);
//and, finally, starting output in the template.


            include $style_path."/main_header.html";
            if (!$total_rows == 0 ){ 

?&gt;
&lt;table  border="15" align="center" class="table table-bordered table-striped"&gt;
&lt;form name="form1" method="post" action="uploaded.php"&gt;
                            &lt;thead&gt;
&lt;tr&gt;
&lt;div id="checkboxes"&gt;
&lt;td &gt;&lt;strong&gt;Delete&lt;/strong&gt;&lt;/td&gt;
&lt;td width="10%"&gt;&lt;strong&gt; No.&lt;/strong&gt;&lt;/td&gt;
&lt;td width="40%"&gt;&lt;strong&gt; File Name&lt;/strong&gt;&lt;/td&gt;
&lt;td width="30%"&gt;&lt;strong&gt; Type&lt;/strong&gt;&lt;/td&gt;
&lt;td width="30%"&gt;&lt;strong&gt; Size&lt;/strong&gt;&lt;/td&gt;
&lt;td width="40%"&gt;&lt;strong&gt; Download&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
                            &lt;/thead&gt;
&lt;tr&gt;
&lt;? foreach ($DATA as $i =&gt; $row  ): echo $row[filename]; ?&gt;

                            &lt;tbody&gt;
&lt;td class="even gradeC"&gt; &lt;center&gt;&lt;input name="checkbox[]" type="checkbox" id="checkbox[]" class="checkbox" value="&lt;? echo $row[0]; ?&gt;"&gt;&lt;/input&gt;&lt;/center&gt;&lt;/td&gt;&lt;td class="even gradeC"&gt;&lt;?=$i?&gt;&lt;/td&gt;&lt;td class="odd gradeX"&gt;&lt;?=$row[1]?&gt;&lt;br&gt;&lt;/td&gt;&lt;td class="even gradeC"&gt;&lt;?=$row[4]?&gt;&lt;/td&gt;&lt;td&gt;&lt;?echo convertFileSize($row[3]);?&gt;&lt;/td&gt;&lt;td class="odd gradeX"&gt;&lt;button class="btn btn-quaternary" href="index.php"&gt;&lt;a href="download.php?view_file=&lt;?=$row[0]?&gt;" target="_blank"&gt;Download&lt;/a&gt;&lt;/button&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;

&lt;? endforeach ?&gt; 
&lt;/div&gt;
&lt;/table&gt;

        &lt;?
include $style_path."/my_files.html";       

if($_POST['checkbox']){
for($i1=0;$i1&lt;count($_POST['checkbox']);$i1++){
$del_id = $checkbox[$i1];
$sql = "DELETE FROM upload WHERE newfilename='".$del_id."'";
$result = mysql_query($sql);}


for($i2=0;$i2&lt;count($_POST['checkbox']);$i2++){
        $del_id2 = $checkbox[$i2];
        $fh = fopen($upload2_path.$del_id2, "r") ;

        fclose($fh);
                        if (is_writable($upload2_path.$del_id2)) {
        unlink($upload2_path.$del_id2);
        } else {
        echo "Error : The file is not writable";
        die ;
        }
    }


    if (in_array($row[4], $ext2))
{
for($i3=0;$i3&lt;count($_POST['checkbox']);$i3++){
        $del_id3 = $checkbox[$i3];
        $fh = fopen($upload2_path."thumb/".$del_id3, "r") ; 

        fclose($fh);
                if (is_writable($upload2_path."thumb/".$del_id3)) {
        unlink($upload2_path."thumb/".$del_id3);
        } else {
                echo "Error : The file is not writable";
                die ;
        }
    }



}



if($result){
echo "&lt;meta http-equiv=\"refresh\" content=\"0;URL=uploaded.php\"&gt;";
}}
mysql_close();
}else{ ?&gt;
                &lt;div class="login_message error"&gt;
            &lt;center&gt;The folder is empty&lt;/center&gt;
    &lt;/div&gt;        

&lt;? } 
include $style_path."/main_footer.html";


        break;
</code></pre>

<p>but it is not showing me any error
mmmmm i am 70% sure that there is not an error in this code thats what i thing i will expect some tips from you all , thanks</p>
