Ok then,
to set the cookie in directory /var/www/html:
$time = time();
$name = md5($_POST['name']);
$pass =md5($_POST['pass']);
$check = $_POST['set'];
$path="/";
$query = "select * from table where Username='$name' and Password='$pass'";
$sql = mysql_query($query) or die(mysql_error());
while ($res = mysql_fetch_array($sql)) {
$name=$res['FullName'];
$eid=$res['id'];}
$cookie_data = $name.'-'.$eid;
$cook = setcookie ("cookie_info",$cookie_data, $time+3600, $path);
And to retrieve (check if its set) the cookie in directory /usr/share:
if (isset($_COOKIE['cookie_info'])){
$cooks="COOKIE"; }
else {
$cooks="No Cookie";
}
echo $cooks;
If i run this in the /usr/share directory the echo is "No Cookie" and in the /var/www/html the echo is "COOKIE".
seno