Not knowing how to make a function could be a valid question and the first answer, by OriginalGriff gives you a lot of insight as to what should be considered, along with a flow.
I don't think that solves your problems as you added "
Quote:
And I Don't know how to set it In my code if I find it out.
leads me suspect you don't have any idea about how to use php at all. I suggest strongly that you got to this site and learn:
PHP 5 Tutorial[
^]
It's as though you asked 'what do I need to make soup', followed by a question like 'how do I cook'?