Iphone 4 will not charge when connected to computer via USB?

I just downlaoded iTunes and wanted to connect my iPhone 4 to my computer to get some songs off of it until i noticed that nothing happens when i plug it in. I tried plugging it in to another computer and still nothing. I used three different cables and checked all 7 of my USB ports. My computer even recognizes my old iPod but not my phone, and my iphone does still charge when plugged into the wall. I uninstalled itunes and reinstalled it, restarted my computer, everything i could think of and i spent hours googling everything and nothing will fix it (btw my phone software is up to date also). My phone has not been plugged into a computer for at least a year or two. If somone could help i would greatly appreciate it.

During my experiences in the Tech industry your best bet is to either:

1) Buy a new cable, it's most likely the wires are damaged and can't be used for the connection.

2) Check your iPhone charging entry (The bottom area) maybe there's something preventing that!

Best of luck
Cheers.

It seems [the hole where your wire is plugged into] on your phone is probably dirty. Clean it out, simple as that.