Hello i have a form like this:
<tr><td>First Name:</td><td><input data-check="f_n" type="text" name="first_name" /></td>
<td data-msg="f_n"></td></tr>
<tr><td>Last Name:</td><td><input data-check="l_n" type="text" name="last_name" /></td>
<td data-msg="l_n"></td></tr>
now i did a jquery $.post to connect to php to desplay a error in case is needed, so far i have this:
<script type="text/javascript">
$(document).ready(function(){
$('[data-check]').click(function(){
var a = $(this).data('check');
$.post('website/register/checks.php',, function(data){
$('[data-msg='+ a +']').html(data);
});
});
});
</script>
I’m really confuse, on how to send the correct data according to the users input.. and show it in the correct <td></td>
You need to set the post data as the second parameter of
$.post