<?php
$db = mysql_connect('localhost', 'username', 'password') or die('Could not connect: ' . mysql_error());
$db_selected= mysql_select_db("databaseName", $db);
if (!$db_selected)
{
die ("Can\'t use test_db : " . mysql_error());
}
$name = mysql_real_escape_string($_GET['name']);
$date = date("d/m/Y");
$adClick =($_GET['adNum']);
$playN = ($_GET['playClick']);
$query = "INSERT INTO playerData (mac,date,adClick,playNum) VALUES ('$name', '$date','$adClick','$playN') ON DUPLICATE KEY UPDATE playNum = playNum+$playN, adClick = adClick + $adClick;";
$results = mysql_query($query, $db);
echo "$query";
mysql_close($db);
?>