I cannot get this to work, the page already has other jquery functions running completely fine so i know jquery is working (jplayer and lazyload work fine)
here is my javascript function:
<script type=text/javascript>
function upone() {
$.get(upone.php);
return false;
}
</script>
Here is my link
<a href=# onclick=upone();>Like</a>
and my php file upone.php is :
<?php
include(include/config.php);
include(include/functions/import.php);
if(isset($_SESSION['USERID'])&&$_SESSION['USERID']>=0&&is_numeric($_SESSION['USERID']))
{
$USERID=$_SESSION['USERID'];
$query=INSERT INTO audio_like SET USERID='.mysql_real_escape_string($USERID).';
$result=$conn->execute($query);
}
?>
the php file runs fine if i manually link to it, clicking on the link also results in the page refreshing with the # added to the page. Any ideas?