hello,
I have this problem.
I have a site in php and I use cookies to user to log in.
This works fine on my host.
But now I have registered a domain on .tk
There I have the problem that it doesn't set my cookies at all.
I can't access a page because there are no cookies.
Does anybody know why this doesn't works?
This is my code that works on my host but not on a .tk:
<?php
if(isset($username)&&isset($password))
{
//$count++;
//setcookie("test2",$count);
setcookie("user0",$username,time()+86400);
setcookie("user1",$password,time()+86400);
include("dbconnect.inc");
$query_recordset1= "select UserID from tblusers where Username='$username' and Password='$password'";
$recordset1=mysql_query($query_recordset1,$db) or
die (mysql_error());
$row_recordset1=mysql_fetch_assoc($recordset1);
$totalrows_recordset1=mysql_num_rows($recordset1);
$check=$row_recordset1['UserID'];
if($check<>null)
{
echo "<body><table width=75% align=center><tr><td><font size=6><strong>You will be tranferred immediatly</strong></font></td></tr></table>";
echo "<meta http-equiv=refresh content=5;URL=rechts.htm>";
}
else
{
echo "Your Login wasn't right.<br>";
echo "<meta http-equiv=refresh content=0;URL=wronglogin.php>";
}
}
?