in the above script, how to check if a file aready there, if not, accept it for uploading, if yes, print a error message.
I've tried below be can seem to make it go fine >_<
PHP Code:
if (file_exists($file_name)) {
echo"
<table width=414 border=0 cellpadding=0 cellspacing=0 align=center>
<tr>
<td width=414 height=13 align=center valign=top class=main-table><strong>IMAGES UPLOAD </strong></td>
</tr>
<tr>
<td height=100% bgcolor=#333333></td>
</tr>
<tr>
<td height=22 align=center valign=top class=main-table>
File already exists, Please change the filename or try another one.
</td>
</tr>
<tr>
<td height=100% bgcolor=#333333></td>
</tr>
<tr>
<td height=12></td>
</tr>
</table>"; }