FieldsRequest(array('id','name','md5')); $mysql->QueryRequest("SELECT * FROM torrents WHERE md5='{$torrent['md5']}' LIMIT 1"); if($mysql->outputfields['md5'][0] == $torrent['md5']){ $template['error'] = "Oops!, the file that you are trying to upload already exist in out database under the name outputfields['md5'][0]}\">{$mysql->outputfields['name'][0]}.torrent."; }else{ $mysql = new MySql; $mysql->QueryInsert("INSERT INTO torrents (name,hash,size,md5,description,tags) VALUES ('{$torrent['name']}','{$torrent['hash']}','{$torrent['size']}','{$torrent['md5']}','{$torrent['description']}','{$torrent['tags']}');"); $template['success'] = "{$torrent['name']}.torrent Succesfully uploaded!"; $mysql->Query("OPTIMIZE TABLE torrents"); } }else{ $template['error'] = 'Oops!, it seems that the file you are trying to upload is not a .torrent file. Please check the file and try again.'; } }else{ $template['error'] = 'Oops!, it seems that the file you are trying to upload is not a .torrent file. Please check the file and try again.'; } }else{ $template['error'] = 'Oops!, it seems that the file you are trying to upload is not a .torrent file. Please check the file and try again.'; } } ?>