Electrical issue when starting on 2003 Volvo S40

When I put the key into the ignition, the headlights and dashboard lights light up...But when I try and start the engine---the headlights and dashboard lights just flicker on and off and engine will not start?

Thanks for the reply...(Oh...I also forgot to mention that when I jump started the battery...was able to drive...but about 20-30 minutes after I arrived home and tried to re-start...I encountered the same problem as above...) Does this further confirm failing battery...

Have the charging system checked out, but also have a Volvo shop check the immobilizer system. (The immobilizer is the security system where you have a microchip in the key that prevents someone from starting you car with another key)