I get this error, I think my code needs some cleaning but I can't figure out where the issue is.
Parse error: syntax error, unexpected T_STRING in /home/user/public_html/mydomain.com/tracking.php on line 12
*********code*************
<body>
<?
//connecting to the database we setup
DEFINE(‘DB_HOST’,'localhost’);
DEFINE(‘DB_USER’,'username’);
DEFINE(‘DB_PASS’,'password’);
DEFINE(‘DB_PRIMARY’,'mydatabase’);
mysql_connect(DB_HOST,DB_USER,DB_PASS);
mysql_select_db(DB_PRIMARY);
// Server variables
$ip = $_SERVER['REMOTE_ADDR'];
$referer = $_SERVER['HTTP_REFERER'];
$useragent = $_SERVER['HTTP_USER_AGENT'];
// capturing data we passed in the url
//ie. // I’ve added the engine the click is coming from as
// I’m starting to branch out to other engines now
$keyword = mysql_real_escape_string($keyword);
$source = mysql_real_escape_string($source);
$sql = “INSERT INTO clicks (keyword, source, ip, referer, useragent, time, site) VALUES (‘$keyword’,'$source’,'$ip’,'$referer’,'$useragent’,NOW(),’$site’)”;
mysql_query($sql);
$id = mysql_insert_id();
?>
</body>
*************** end code ************
******* code on index page ******
<?
$site = “domain.com/index1”;
include('?>
<a href=” echo $id; ?>”>link</a>
*************** end code *************
Thanks a million in advance
Parse error: syntax error, unexpected T_STRING in /home/user/public_html/mydomain.com/tracking.php on line 12
*********code*************
<body>
<?
//connecting to the database we setup
DEFINE(‘DB_HOST’,'localhost’);
DEFINE(‘DB_USER’,'username’);
DEFINE(‘DB_PASS’,'password’);
DEFINE(‘DB_PRIMARY’,'mydatabase’);
mysql_connect(DB_HOST,DB_USER,DB_PASS);
mysql_select_db(DB_PRIMARY);
// Server variables
$ip = $_SERVER['REMOTE_ADDR'];
$referer = $_SERVER['HTTP_REFERER'];
$useragent = $_SERVER['HTTP_USER_AGENT'];
// capturing data we passed in the url
//ie. // I’ve added the engine the click is coming from as
// I’m starting to branch out to other engines now
$keyword = mysql_real_escape_string($keyword);
$source = mysql_real_escape_string($source);
$sql = “INSERT INTO clicks (keyword, source, ip, referer, useragent, time, site) VALUES (‘$keyword’,'$source’,'$ip’,'$referer’,'$useragent’,NOW(),’$site’)”;
mysql_query($sql);
$id = mysql_insert_id();
?>
</body>
*************** end code ************
******* code on index page ******
<?
$site = “domain.com/index1”;
include('?>
<a href=” echo $id; ?>”>link</a>
*************** end code *************
Thanks a million in advance