[PHP] Re: cookies under php 4.06

2003-09-04 Thread Chris Kranz

setcookie(UserName, $HTTP_POST_VARS['UserName'], time()+(60*10), /,
 $HTTP_SERVER_VARS['SERVER_NAME']);
setcookie(Password, $password, time()+(60*10), /,
 $HTTP_SERVER_VARS['SERVER_NAME']);
print login - set cookie;


sorry for kinda answering my own post... but anyway...

setcookie(UserName, $HTTP_POST_VARS['UserName']);
setcookie(Password, $password);

solves my problem, although means i can't have a time limit on my cookies i
guess... but can set a time limit with another cookie...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: cookies under php 4.06

2003-09-04 Thread Comex
 sorry for kinda answering my own post... but anyway...
Or you could use header()..
http://wp.netscape.com/newsref/std/cookie_spec.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: cookies under php 4.06

2003-09-04 Thread Jennifer Goodie
 setcookie(UserName, $HTTP_POST_VARS['UserName'],
 time()+(60*10), /,
  $HTTP_SERVER_VARS['SERVER_NAME']);
 setcookie(Password, $password, time()+(60*10), /,
  $HTTP_SERVER_VARS['SERVER_NAME']);
 print login - set cookie;


 sorry for kinda answering my own post... but anyway...

 setcookie(UserName, $HTTP_POST_VARS['UserName']);
 setcookie(Password, $password);

 solves my problem, although means i can't have a time limit on my
 cookies i
 guess... but can set a time limit with another cookie...

1.) I would not store the user's password in a cookie.

2.) As far as I know, set_cookie() has worked the same since PHP3, so your
problem is something else, not the PHP version.  Are you sure
$HTTP_SERVER_VARS['SERVER_NAME'] is the same as what's in the location bar
in your browser.  If the server name is set up as www.domain.com but the
user is just at http://domain.com the cookie won't set.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php