Each input on your form has to have a unique ID so you can refer to it. Also edit links have to have uinque IDs. You can use an ID from the database data or something else.
<input name="tx_name" type="text" id="tx_id-<? echo $data['id']; ?>" size="35" value="<? echo $data['title']; ?>"/>
<a href="#" class="editname" id="<? echo $data['id']; ?>">Edit</a>
Now you can catch the onclick event of edit link and read record ID from it:
$(".editname").click(function() {
var recordId = $(this.attr('id'));
// use recordId to access input fields
var inputValue = $(('txt_id-' + recordId)).val(); // or something like that
...
EDIT: I have done several edits in the code so make sure you refresh to the last version.
The code above might be a bit wobly but you get the principle. I haven't tested it.