Instead of thinking of it as "tickbox", think of it as an HTML checkbox, which is what is is. Since your login form is already a <form>, treat the checkbox like anyother HTML checkbox.
During the login process, the PHP script that you have should also check whether the checkbox for "remember me" is checked, and if it is, you can create the cookie.