hi razzak i'm afraid i don't know php, so i cannot help with your coding problem however, you can combine your two queries into one, which will run faster select pic from articles inner join users on articles.author = users.author where submitdt = $id rudy