You can put this solution on YOUR website!
If the samples are independent i.e. the elements from which the samples are collection are not identical in the samples an independent t-test is performed. But if the samples are dependent then a dependent t-test is performed.