Problem with cookies and header() (newbie)
Posted: Sat Oct 09, 2004 10:04 am
Hi,
I'm having a problem with cookies. I use setcookie() in signmein.php to set 2 cookies and just after that I call header():
The problem is that in admin.php I'm trying to get those cookie values and they seem to be empty (not set).
It has to be a very obvious thing, I know (maybe an include?) but any help will be greatly received. As I said in the topic, I'm a newbie in PHP
Thanx.
I'm having a problem with cookies. I use setcookie() in signmein.php to set 2 cookies and just after that I call header():
Code: Select all
setcookie ("iguser", md5($_POSTї'username']), $time+3200);
setcookie ("igpass", md5($_POSTї'password']), $time+3200);
header ("Location: http://foo.com/admin.php");Code: Select all
session_start();
if (isset($_COOKIEї'iguser']) && isset($_COOKIEї'igpass']))
{
if (!($_COOKIEї'iguser'] == md5($user_name) && $_COOKIEї'igpass'] == md5($user_pwinput)))
{
echo $_COOKIEї"iguser"];
echo $_COOKIEї'igpass'];
//header("Location: signin.php");
//exit();
}
}It has to be a very obvious thing, I know (maybe an include?) but any help will be greatly received. As I said in the topic, I'm a newbie in PHP
Thanx.