Hi Sam,

I would recommend you to take a look at php.net they could give you a hand overthere.