Make a logout page!
When people are about to logout, lets say they have to click a link, this link will go to logout.php, here you remove the cookies you've set after this is done redirect to the page you wan't the user to be when there not logged in anymore...
Or you can work in a session. PHP 4 lets you set a session very easily. Check the manual for help.
Good luck!
Horza