I HAVE THIS FOLLOWING CODE THAT WORKS PERFECTLY, IT IS A SMALL UPLOAD SYSTEM. (IM FROM BRAZIL)
<? $extensao=substr($arquivo_name, -4); if (!empty($arquivo) and is_file($arquivo)) { $caminho="C:\\web\\upload\\"; $caminho=$caminho.$arquivo_name; copy($arquivo,$caminho); echo "<h1>O arquivo foi transferido!</h1>"; }else{ echo "<h1>O arquivo não foi transferido!</h1>"; echo "<h2><font color='red'>Nome, caminho ou extensão de arquivo Inválido</font></h2>"; } ?> into the $extensao=substr($arquivo_name, -4); i get the value of the upload file extension. All that i wish to do is to make an if like this one if $extensao<>.rep { echo "<h1>The file is not valid!</h1>"; }else{ echo "<h1>The file is valid!</h1>"; But i cant do that it does not work, can anyone help me? -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php