A treadmill has some benefits over an elliptical: It can be more effective for burning calories and improving strength. However, the elliptical is easier on your joints, especially your knee joints, offering lower impact workouts.
If you're looking to get something specific out of your workouts, it might be best to discuss it with a physiotherapist or personal trainer, as they can give you personalized advice on which machines to use.