input'a: <input type="text" class="input1" value="<?php echo $searchstring; ?>" name="searchstring">
echo "<td> <a href='$address'>".str_replace("\n", "<br>", $address)."</a></td>";
$(document).on('click', 'td>a', function(){
var text = $(this).text();
$(.input1).val(text);
}