Everthing I ever heard about it involved carved pumpkins...
You have to keep your pumpkin hydrated, and there are several ways of doing that. After you carve the jack-o-lantern design into your pumpkin, coat the cut edges and the inside of the pumpkin with petroleum jelly. Good old Vaseline will help seal in the moisture of the pumpkin and extend the life. Vegetable oil can be used instead of Vaseline, or spray the inside of the pumpkin with hair spray. Either of the three will seal in moisture and keep your pumpkin fresh till Halloween.
If not carved, keep it in a cool place (off the floor) and on some packing popcorn and rotate it every day or so. You can hair spray the outside too.
If it starts to shrivel, put it in water with 1 tsp of bleach per gallon (to prevent mold), and after it puffs back out, hair spray it... and mist it everyday.
That's it.... and hope they last. 