This keeps happening to my iPhone 3g, all that you have to do is:
1. UNPLUG the USB cable from your iPhone,
2. Hold down the home button (black circular button) for 5 secs,
3. Then, keeping the home button pressed, plug in your USB charger.
Et voila!! Your iPhone has the silver apple on the screen = IT IS CHARGING



:dft0 10:smiling
Hope I could be of help...