Yeah what Clareh said
Try having a small protein and carb snack before you hit the gym. An apple with peanut butter, toast with creme cheese, cottage cheese and ryvita. That should solve it if it's blood sugar issues.
Otherwise, you could simply be working too hard. I get faint when I push through and work really really hard.
On the treadmill, try doing intervals of 1 minute normal walking pace then 30 secs brisk walk and alternate that for your 15-20 minutes on the treadmill.
Also with the weights workouts, STAY AWAY FROM MACHINES! Really, they are the devil incarnate and if you're shorter than the "average" then they can actually do you some harm. Check out
www.stumptuous.com and click on iron. There are some weights programs and she has a lot of sensible advice about dieting and training.
Let us know how it goes!