If you need to replace the valve (not a huge job on most vehicles as long as the pipes are not too corroded), here's one trick you can try - fill the brake fluid reservoir and cover the top with a clean seal (rubber glove, clingfilm, plastic bag) before screwing the cap back on. That will prevent or at least reduce loss of brake fluid while you do the valve, and may mean you only need to bleed the rear brakes when you've done (and removed the seal!).
Brian is spot on. However odds are it's the valve needing replacing. This is normally mounted on or near rear axle. These rarely fail but can account for no rear brakes or poor performance.
what brand of vehicle? if it is a Chevy Silverado that's common the sensors need to be disconnected and cleaned and then the valve thing you mentioned rusts up real good on these trucks ranging years 1999 to 2008 after this you should be good to go and retest :)
While it's true that a proportioning valve can cause this, it's not a common part to fail, so I'd look at a couple of other things before jumping to that conclusion and paying someone to replace it.
First, verify that the brakes are bled properly. Air can get into the hydraulic lines from several sources including brake fluid reservoirs that are allowed to run dry, and once it gets into the lines, it will not come out on its own. Brakes lines that contain air will cause the brakes to feel spongy in most cases, but if there's enough air, it can cause the brakes to fail completely.
If the problem is the rear brakes, and these brakes are drum type, make sure all of the parts are assembled and aligned properly, and that the pads aren't worn. Since front brakes provide the bulk of the stopping power, rear brakes don't wear down nearly as quickly as the front, causing people to often forget about them. They won't always provide obvious signs of excessive wear, and if the parts are not aligned properly, they may provide only partial braking effort.
If no other problems can be found (including the master cylinder and other portions of the braking system), then replacement of the proportioning valve might in fact be warranted. Note that when you replace this, the system will be opened up to the atmosphere, meaning that the entire system will need to be bled. Make sure this is done properly or brake failure will likely occur.
THAT'S THE BRAKES...........
My truck fail the inspection test due to the brakes. I don't how to explain but they put it on the dyno run. They ran my truck on the dyno test about 50mph and then use the brakes. Full hard brakes, the wheel still spinning which is not a good thing. Do you know what wrong with it? I been told it the pro portioning value that need to be replace. The brake fluid isn't going through to the brakes. That what I been told. Please help. Thanks