It is possible that your pills were damaged by the heat, especially since the interior temperature of a car can get much hotter than the outside temperature, but there isn't a way to know how much their effectiveness might have been impacted. I doubt that the heat would make them completely ineffective, though, especially after just a few hours.
It's unlikely that there would be a health risk involved in taking the pills if they were compromised; it might make them less effective but wouldn't be likely to cause any other problems or be dangerous to take.
Since you have new pills now, it sounds like you're all set moving forward, which is great. If you're currently sexually active, you may want to use condoms as well, if you aren't already, for the next month or two; they can act as a backup method in case there was any change in your pill's effectiveness for that last week.