PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
tisa
Forum Commoner
Posts: 27 Joined: Fri Nov 28, 2003 1:14 am
Post
by tisa » Wed Feb 25, 2004 8:57 pm
I use cookie to save user login name and password, then the user don't need to login again next time.
the following code just for testing...but it seems the cookie did save the value, help me pls~~~
<?
$data0 = $data1;
$data1 = $data1 + 100;
setcookie( "data1", $data1 );
echo "comming the site, \$data1=$data0<BR>";
echo "leaveing the site, \$data1=$data1<BR>";
?>
AVATAr
Forum Regular
Posts: 524 Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:
Post
by AVATAr » Wed Feb 25, 2004 9:11 pm
"I use cookie to save user login name and password, " i dont recomend that... it could be a big security risk..
check $_COOKIE['data1']
tisa
Forum Commoner
Posts: 27 Joined: Fri Nov 28, 2003 1:14 am
Post
by tisa » Wed Feb 25, 2004 9:20 pm
thank you very much.!! it work now...
i also don't want use cookie . but my system has to provide one function, if the user allow to use cookie to save login info., then next time user don't need to login again.
do you have another suggestion
AVATAr
Forum Regular
Posts: 524 Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:
Post
by AVATAr » Wed Feb 25, 2004 9:22 pm
the problem there is...
what if another user use the same computer????