sriram wrote:I'm a college student and i've a assignment to complete.If possible, can i get the complete code.
No. We're not here to do your assignments for you.
This is pretty basic PHP. I recommend you read the beginning tutorial and the first few chapters of the manual at the official site and, if possible, pick up a good PHP book at your local bookstore.