My volume bar is gone on my iPhone

For the last week my volume bar has disappeared when I press the button. The speaker shows up but nothing happens. It won't play music or YouTube and the volume bar is gone there to. It doesn't work on games either. Today I was playing a game and I heard sound and it worked for a split second and then it stopped. It did that twice. Why does it do this and how can I fix it? I have an iPhone 4

My iPhone 4s is doing the same thing.
Searching in google I found that it is a common problem and can be fixed by cleaning the dock connector (where you plug in your charger).It can be cleaned with alcohol, or with a small card, or you can use compressed air to clean it.
I tried cleaning my phone with a piece of paper but that did not work, and I think it happened because some water got inside, so I'll try placing it in some rice to absorb the water and see how that turns out.

  • Why doesn't my iPhone 4S volume bar don't work? Okay so I found out like three days ago that my volume doesn't work like once I try pressing on the + or - on the volume it just says ringer and it doesn't go high or low, it also doesn't work for like an app example vine or fun run, or music. I tried going to settings, general, reset, and reset all settings and its still not working.
  • Why does the volume bar on my iphone disappear and appear whenever it wants to? I have an iPhone 4. If I try and listen to music the volume bar goes away and when I try to adjust the volume with the + and - buttons the volume bar under "ringer" is gone. I've tried restarting my phone, fixing the settings, plugging in my earphones and cleaning where you plug them in and connecting my phone to my laptop but nothing seems to work.
  • Why does't the volume bar on my iPhone 4s appear? I can't play music out loud with my iPhone. The volume bar only appears when I have headphones in and it still will disappear with them in sometimes. Could have to do with something getting wet? I've updated and rebooted my iPhone but the volume bar still doesn't appear.
  • Volume bar disappeared on my iPhone 4s? I put my phone on an iphone dock and when i took it off my volume bar disappeared. I tried cleaning it, i tried holding the top button and double clocking the home, i've rebooted it, turned it on and off. Nothings working, please help