Not the best method of application development .... what happens if there is an error in the script? You'll probably spend a couple of hours trying to find the error .... then another hour trying to fix it.
Best thing to do is to research the problem area - yes, look at existing code on the internet. There are plenty of sites out there - far too many to mention. At least that way you will have learnt something!