I want a campground between Joshua Tree and Phoenix. Somewhere that would be safe for a female traveling alone!!!
The main route from Joshua Tree to Phoenix would be along I-10, crossing the Colorado River near Blythe. Unfortunately, there is not much of anything between the border and Phoenix (campgrounds or otherwise).
About 30 minutes this side of the border is the small desert town of Quartzite. It is a major RV spot for snowbirds and gets quite a crowd in Jan-Feb when they have a big swap meet and rock show. There are quite a few RV parks around the edge of town that would probably let you camp for a night (since they are not quite at peak season). I once just slept in my car at the large dirt public parking spot near the Hi-Jolly monument (western end of town). It is probably not ideal from a safety perspective, but there are a fair number of businesses and other people around.
Heading east from Quartzite there is really not much at all until you reach the suburbs of Pheonix (which extend quite a ways west of the city and are growing outward by leaps and bounds).
From Quartzite, you could take the longer, but more interesting, old Route 60 (a classic old historic highway). At the small junction town of Hope there is a small RV park, but I have never stayed there and can’t speak to quality or safety.
Frankly, if you are heading from Joshua Tree to Phoenix, I would just camp at Joshua Tree and then get up early and go straight through to Phoenix – not much to stop and look at along the way anyways.