While these cookies are certainly less stressful to make, if you do want net cookies I suggest that you have include files.
This is useful because you can set the cookie at once, or, as I do, set it if the username and pw match a db list.
Just set it so that if they match the cookie is set, then put the include file containing the form AFTER this...
ie (yes, this isn't reading from a db)
This does NOT work
<?php
include "login_form.inc"; }
if ($user == "user") {setcookie ();}
include ("connect.inc");
?>
This DOES work
<?php
if ($user == "user") {setcookie ();}
include ("connect.inc");
include "login_form.inc"; }
?>
:-)