[eluser]Unknown[/eluser]
hi all, im a beginner in CI n this forum too, i try to use ajax to send my data to DB, but not working, i've tried to solve it, but it's still the same,
this my simple form:
Code:
<table id="formIn">
<form>
<tr>
<td>Name : <input type="text" name="nm"></td>
<td><input type="submit" value="save"></td>
</tr>
</form>
</table>
<div id="form_result">
</div>
this is my jquery ajax:
Code:
$("#formIn form").submit(function()
{
$('#form_result').empty();
$.post('http://MySystem/people/save',$(this).serialize(),function(data)
{
$('#form_result').html(data);
});
return false;
});
i create save method in a class named people, just like this:
Code:
function save()
{
echo $this->input->post('nm');
}
i just want to test data that i input could be out in
<div id="form_result">
</div>
but, it dont display.
is there wrong code in code i write?
bcoz no error display, it make me confuse where my error is.
sorry if i make mistake something.
need ur help all, thanks b4.