<?php
$dblink = mysql_connect("localhost","username", "password") or die('Error: '.mysql_error ());
mysql_select_db("database");
$result = mysql_query("select * from tablename where sku=''$_GET['sku']''") or die('Error: '.mysql_error ());
$row = mysql_fetch_array($result);
$link = $row["link"];
mysql_query("update tablename set clicks=clicks+1 where sku=''$_GET['sku']''");
header("Location: $link");
mysql_free_result($result);
mysql_close($dblink);
?>
This returns the following error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/digitall/public_html/redirect.php on line 5