facing problems with inserting data |
You mean the "Send Now" button - right?
I don't see the "savesms()" method anywhere. While looking for it I notice that you have a controller and model that are both named "sms". You probably shouldn't do that. Perhaps name the model "sms_model". The next problem of note is with using sms_form() with the $.post(... call. $.post(... expects data to be returned by the server but you make a redirect() instead. That's wrong. Echo some data in reply instead. Here's one way but it is presented without knowledge of what happens in "savesms()" so it's maybe not the best solution. PHP Code: public function sms_form() Looking more closely at your <form> I cannot find an <input> for either 'sender' or 'sendscheduletime'. So your $save array will have NULL values for those two items. Just to make sure the "Send Now" button 'click' event is being handled do this test. Code: $("#SendSMS").click(function () { |
Welcome Guest, Not a member yet? Register Sign In |