Hi im having problem with seting a cookie.
it runs the script with outany problem but it dosent seam to create a cookie.
any way hers the code.
<?php
include("common.php");
if(!($link_id = mysql_connect($Host, $User, $Pass))) die(mysql_erorr());
mysql_select_db($DB);
$sql = "SELECT ID FROM " . $Table . " WHERE Name='" . addslashes($_POST['Name']) . "' AND Password='" . md5($_POST['Password']) . "' LIMIT 1";
if(!($result = mysql_query($sql))) die(mysql_error());
if(mysql_num_rows($result) == 1) {
setcookie("LoggedIn", "TRUE", time()+(3600 * 24), "/abbe_v4/", "crank-it-up.net", 1);
echo "Continue to the <a href=../addnews.php>Addnews</a> page.";
} else {
echo "Login failure";
}
?>
And then the code that checks the cookie.
<?php
if(!isset($_COOKIE['LoggedIn'])) die("You are not logged in!");
?>
any help/ide would be great =)
Cheers