i have a script where a user can register, then login.

when they login, a cookie sets their username and password, so that on later pages i can use their username and password to display to them their own information, instead of someoneelse's.

but once someone registers, they are taken to a page which confirms their username and password, but, the cookie messes things up so instead of confirming their username and password, it will display someone else's. this is the cookie i set:
PHP Code:
setcookie ("username""$username");
setcookie ("password""$password"); 
so how will i make the cookie for only certain pages? thanks in advance