Location: PHPKode > scripts > Starting Page > starting_page/outgoing.php
<?php
require('include/conn.php');
$linkid = $_GET['linkid'];

$result = mysql_query("SELECT * FROM ".$prefix."links WHERE link_id = ".$linkid." ORDER BY link_id") or die("A MySQL error has occurred.<br />Your Query: " . $your_query . "<br /> Error: (" . mysql_errno() . ") " . mysql_error());
while($row = mysql_fetch_array($result)) {
	$linkurl = $row['link_url'];

	$sql = "UPDATE ".$prefix."links SET link_clicks=link_clicks+1 WHERE link_id=".$linkid; 
	if (!mysql_query($sql)) {
		die('Error: ' . mysql_error());
	}

	header('Location: '.$linkurl);
}
?>
Return current item: Starting Page