How to properly back up your iPhone before updating the software?

So last time I updated my iPhone to iOS5, I thought I did everything properly, and I ended up losing all my pictures, videos, and contacts; pretty much everything except for my music. I really don't want to mess things up again updating to iOS7, so could someone please explain in detail how to properly backup everything on my phone before updating?

It's amazing what Apple has on their website. Surprisingly they care a lot about people finding out how to use their products effectively.
Here's your answer:
http://support.apple.com/...cale=en_US
I googled your title and this was the first thing that came up.

Use your iclouds and iTunes backup or just head up to Apple care website