将值发送到客户端页面

I would like to ask what code should i start to study to perform this kind of task in a webpage...the thing is the server and client is both active..if the server type a values in the input(boxes) and click send it will automatically send it to the client page wich is already opened by a client....is this possible??im just a newbie programmer...help me please.

what code should i study and is there any tutorial about this? can i have a link? please

enter image description here

This should do the work:

get_data.php

<?php

/* Your db-code
Put it in an array called $data
like:
$data = array('name' => $row['name'], 'age' => $row['age']); */

header('Content-type: application/json');
echo json_encode($data);

?>

JS

function check_for_data() {
    $.post('get_data.php', function(data){
        $("#name").html(data.name);
        $("#age").html(data.age);
        $('#'+data.gender+'').prop('selected', true);
        // etc...
    }, "json");
}

setInterval(check_for_data, 5000);

HTML

<input type="text" id="name">
<input type="text" id="age">
<select>
<option id="male" value="male"></option>
<option id="female" value="female"></option>
</select>
<!-- etc -->

Note

1. You've got to have the name the id to the <option> tags the same as the possible values from the database for gender.

2. Functions like this tend to go heavy on the server. If this will be used by many people on your site, you can make the function check for new data less often (right now it does so every 5000 milliseconds (5 seconds)).