Guys i have a big problem, I have this jquery (I think) code, this code doesn't works from the ajax, and I don't know why, maybe someone can help me.
function showname(id){
$.ajax({
url:'tooltip.php',
data:{id:id},
async: false,
success:function(response)
{
// use response for tooltip
alert(response);
}
});
});
}
I put an alert on the php code, and the php code works when I call from url (like http://mysite.com/tooltip.php?id=LNFC without " ' ") that code must return the result of the query done on php code.
Php code
<?php
$q="SELECT complete_name from mytable where id='".$_REQUEST['id']."'" or die(mysql_error());
$result=mysql_query($q,$conection);
$row=mysql_fetch_assoc($result);
echo $row['complete_name'];
?>
Thanks.