I am trying to output the row in the database which matches the forename and surname of the student from the dropdown list. i've got the function storing the first name and surname in the variable clickeditem. I must be going wrong in the Ajax/php side of things, possibly the way in which accessing the variable? When I click a name in the dropdown list nothing is occurring at all. Also I am echoing out the 'result' in the php file, how do I change that so the ajax can deal with the 'success'? The code with html and ajax:
<script
$.ajax({
type: "POST",
url: "out.php",
data: {item : item},
success: function(data){
$("#result").html(data);
//alert(response);
}
});
});
</script>
I have used explode to separate the first name and surname from the string as it obviously will be all in one.