How much money do you have?
The old samsungs are not good. I have an iphone 3g and a nexus s, the iphone 3g is 5 years old and it's battery life is the same as the nexus s. It's also considerably faster, and ios is a ton better than android. Iphone 3g's build quality is MUCH better than the newer samsungs, and the touch is much better.
Both have a lot of problems, but Android disgusts me in a lot of things. Both have problems like not being able to run YT in background, and websites not being cached when multitasking.
Don't buy an expensive phone unless hurr durr got money to throw away.
Do you use your phone for hurr durr gaming and all kinds of things? Or do you use it as a comms device (SMS, calls, Skype, fb chat, etc)?
Give us more info than "old iphone or samsung what do". What do you need? What is your budget? What are your options?