Okay I know this has been answered before (Execute PHP script on same page after selecting a dropdown list option using Ajax or JavaScript) but the answers weren\'t very hel
var id="1";
$.ajax({
type: 'POST',
url: 'yourphppage',
dataType: "json",
data: {
idofrow:id
},
success: function(data) {
alert(data);
},
error: function(data) {
alert(data);
}
});
This is a samle of ajax request you can use this and just change the other fields as need when the query is success you can retrieve that data in the success you can manipulate what data you want to use you can return json,text.
In your php page you can retrieve the id as
$id = ($_POST['idofrow']);
you can then you this id to select like this
SELECT * FROM table where rowid = $id
and you can just echo the result.
for additional info just check on this documentation