Then you must look at doing many things at once, not one then another as you have done. It may take some time to get your head around this, because you've admitted your code so far consists of grabbing pieces off the internet, but at this point your progress will be nil until you do. Please read through:
There are other helpful threads in the Tutorial section as well, but this one is an excellent starting point.