Ive read about cookies, I understand some of the stuff...but say im checking passwords with a database, if the password is true, set the cookie, otherwise print error. I can do everything but the cookie bit. Could some1 plz kinda "explain" the steps and format of setting a cookie, ill give you a a basic example for the login thingy..
//where $do_user is the username text field and $do_pass is the password text field on the login form
$query = "SELECT Password FROM $database WHERE Username='$do_user'";
$result = mysql_db_query($dbname, $query);
$passcheck = mysql_fetch_array($result);
if ($passcheck[0]=="$do_pass")
{
// set cookie here
}
else
{
print "invalid username or password";
}
if you see my point? Any help wud be appreciated, thanx alot for your time peeps :-)