I have stayed at the Hotel Pennsylvania, which is next to Macys and about 15 minutes walk from Times Square. It is cheap, but I wouldn't like to stay there again. I'd prefer to go back to another hotel I've stayed at - the Milford Plaza which is just one block from Times Square, and a much nicer hotel. Whilst at the Penn they advertise that you have to show your room card to enter the lifts in practice this did not happen, and anyone could wander round the hotel, as evidenced by all the takeaway leaflets we found pushed under our door all the time. At the Milford Plaza you do have to show your room card to get to the lifts, so it is much safe, also the rooms were nicer.
http://www.milfordplaza.com/