Я делаю это, используя ajax, jquery и json ...
на странице (A) вы делаете вызов ...
</p>
<pre>
$('input[name="find"]').live('click',function(){
if($(this).val()){
$.getJSON('find.php?users=' + $(this).val(), function(data) {
var rows= "";
$.each(data.users, function(i,user){
rows+= i % 2 ? '<tr class="flip">' : '<tr class="flop">'; ...
rows+= '<td>' + user.id + '</td>';
rows+= '<td>' + user.name + '</td>';
rows+= '<td>' + user.score + '</td>';
rows+= '</tr>';
});
$('#list tbody').html(rows);
}
});
});
</pre>
<p>
Страница find.php или page (B)
<?php
$user = $_GET['users'] ;
// Search code by field ...
// Print de result in JSON format ...
?>
возвращает данные в формате json следующим образом ...
{
"action" : "find user",
"founds" : "2",
"users" : [
{
"id" : "33",
"name" : "Peter Park",
"score" : "343"
},
{
"id" : "1",
"name" : "Clark Kent",
"score" : "1200"
}
]
}
страница (А) вот так ...
<code><table id='list' >
<thead><tr><th>
Id </th><th>
Имя </th><th>
Счет </th></tr></thead>
<tbdoy>
</tbody>
</table>
<input type="text" name="find" value="Find User">