Location: PHPKode > scripts > LinkShort > LinkShort/confirm.php
<?php

	include('includes/settings.inc.php');
	include('includes/db.inc.php');
	$hdrtheme = file_get_contents('themes/header.theme.html');
	$ftrtheme = file_get_contents('themes/footer.theme.html');
	
	$nick 	= trim(htmlspecialchars(mysql_real_escape_string  ($_GET['id']), ENT_QUOTES));
	$key 	= trim(htmlspecialchars(mysql_real_escape_string  ($_GET['key']), ENT_QUOTES));
	
	$query = "SELECT * FROM users WHERE NICK = '".$nick."' and PASSWORD = '".$key."' AND ISACTIVE = '0' LIMIT 1";
	$result = mysql_query($query) or die("<BR>" .mysql_errno().": ".mysql_error()."<BR>");
	$cnt = mysql_num_rows($result);

	if ($cnt > 0){
		$query = "UPDATE users SET ISACTIVE = '1' WHERE NICK = '".$nick."' and PASSWORD = '".$key."' LIMIT 1";
		$result = mysql_query($query) or die("<BR>" .mysql_errno().": ".mysql_error()."<BR>");
		$danke = "Registration is complete, please <a href=\"users.php\">login</a>";
		echo $hdrtheme.$danke.$ftrtheme;
	}else{
		header("Location: ".$base_url);
		exit();
	}
	
?>
Return current item: LinkShort