结果查询TextBox Html中的Php

I have a PHP page in wich I charge result of a query into a Table that i defined like so:

<?php
$json=file_get_contents("http://www.example.com/myfile.php");
$data =  json_decode($json);

if (count($data->result)) {
echo "<table id= 'tabclb'>";
foreach ($data->result as $arr => $result) {
echo"<tr>";
echo "<td><a href=sel_clb.php?id=$result->ID>$result->ID</a></td>";  
echo"<td>$result->Name</a></td>";
echo"</tr><td>";
        }
echo "</table>";
} 
?>

As you can see, my table will have an hyperlink to a php file to recall that name using the ID record. In php file where i have stored my query, I use GET to execute query Json. Well, can someone tell me how I can take ID and Name from query and put them into two textbox that I already have created in my php page like so?

</form>
          <form action="upd_collab.php" method="post" name="form" id="form">
            <label for="nome">Recall</label>
            <input name="idx" type="text" placeholder="idx"/>
            <label for="pass"><br />
            <br />
            Nome<br />
            <input name="Nome" type="text" placeholder="Nome"/>
            <br />
                            Sesso (M/F)</label>
            <p><input name="Sesso" type="Sesso" placeholder="Sesso"/>
            </p>
            <p>
              <input name="submit" type="submit" value="Modifica"/>
            </p>
            <p> </p>
          </form>

I hope it's clear. Thanks

I'll elaborate on my comment that you can do this by interspersing PHP with HTML to achieve this server-side, per your request.

Assuming the HTML for your form is inside your PHP file but outside your PHP tags, you can add the value of a php variable anywhere in the HTML like so:

    <input name="idx" type="text" placeholder="idx" value='<?php echo $valueOfIDX; ?>'/>

For this to work you must not get to this HTML/variable printing section until after you have the value of your relevant variable, since PHP script is executed line by line without any hoisting.

I'll also add this question has been answered here: PHP - Set value in HTML-Form

And you will also find many more examples with an internet search.

You can change your php file as:

<?php
    $json=file_get_contents("http://www.example.com/myfile.php");
    $data =  json_decode($json);

    if (count($data->result)) {
?>
<table id= 'tabclb'>
<?php
foreach ($data->result as $arr => $result) {
?>
    <tr>
         <td><input name="idx" type="text" placeholder="idx" value="<?=$result->ID; ?>"/></td>
         <td><input name="Nome" type="text" placeholder="Nome" value="<?=$result->Name; ?>"/></td>
    </tr>
<?php
} //End foreach
?>
<tr>
    <td><input name="submit" type="submit" value="Modifica"/></td>
</tr>
</table>

<?php
    } //End if
?>

Hope it be helpful for you.