Dear all,I am so not good in programming I need help to finish my assignment asap. I have tried to write with my bad programming skill a function in php to get thumbnail size of the pictures from database when I upload image files and and a default image Notepad.gif if i upload non-image files.here is the function and underneath it is I am trying to call the function in a separate html template inside a table data and it is not showing any result. the name of the php file where the function is edit.php please tell me how i should write the function and why function calling is not working.
function defaultThumb($file_types_array){
$file_types_array=array("txt","jpg","doc","php","css","pdf","gif","JPG");
if(!(($file_types_array=="jpg")&&($file_types_array=="gif"))){
$thumbnail="<img_src='./pictures/Notepad.gif' border='0' height='30' width='30' align='right'>";
return $thumbnail;
}else{
$thumbnail="<img src='./attachments/$relationId.'call'.$id/$attachmentData->filename' border='0' height='30' width='30' align='right'>";
return $thumbnail;
}
}
<td>
<?php
include("edit.php");
$thumbimage=defaultThumb($file_types_array);
?>
</td>