First of all, tidy it up abit. You can have a field day trying to understand that!
<?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 = '$Name' AND Password = '" . md5($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";
}
?>
Other than that I can't help you. I don't use cookies 😃