Thanks for the question and welcome to the Apple Support Communities!
I understand that you are experiencing issues with your iPhone 4s in relation to charging. Trying a different cord is definitely a great isolation step. The following resource provides additional steps that you can try as well:
If your battery doesn't charge, or if your device shows a low-battery image, black screen, or "accessory not supported" alert, follow these steps.
1. Inspect the connector at the bottom of the phone:
- Make sure that there are no bent pins in the connector.
- Make sure that the connector is free from debris.
- If there are bent pins or debris, please contact Apple Support.
- Otherwise, continue troubleshooting.
2. Make sure that the outlet you're using works.
3. Make sure that the Apple USB cable and Apple USB power adapter work.
4. Plug the device in to power and let it charge until your device turns on. This could take between 10 and 30 minutes. If you don't have an Apple USB power adapter, try connecting to a computer's high-power USB 2.0 port (not a keyboard). The computer must be on.
5. If the device still exhibits an issue, try turning your device off and then on again while connected to power.
6. If the issue persists, please contact Apple Support.
I also understand that your iPhone is not recognized in iTunes when connected. This too may be related to the cable itself, however here are some troubleshooting that you can attempt, based on your computer’s operating system: