jblayney
asked on
ajax to record click
Hello,
I am trying to record every click into a database, i am getting no errors, but nothing is recorded either.
here is my jquery
my record.php
I am trying to record every click into a database, i am getting no errors, but nothing is recorded either.
here is my jquery
<a href='/downloadocs/newdoc.txt_2017-11-01-42.zip' name='file8'>Full Report</a>
<script type="text/JavaScript">
$(document).ready(function(){
$("[name=file8]").click(function(){
$("[name=store]").load("/record.php?thefile=8");
});
});
</script>
my record.php
$thefile = $_GET['thefile'];
$thequerysql ="
INSERT INTO tracking
(documents_doc)
VALUES (".$thefile.")";
if (!mysqli_query($link, $thequerysql))
{
$msg = ("Error description: " . mysqli_error($link));
echo $msg;
exit;
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
because it is wordpress, i had to use the full path in both my php connection and my jquery..
/wp-content/themes/...