Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ext.Ajax.request({
- url:'/zend/public/guestbook/sign',
- method: 'POST',
- params: {
- commented : arr2, datecreated : arr3
- })
- public function signAction() {
- if ($this->getRequest()->isPost()) {
- $commentdata = mysql_escape_string($_POST['commented']);
- $dcreatedata = mysql_escape_string($_POST['datecreated']);
- $formdata = array('comment' => $commentdata, 'date_created' => $dcreatedata);
- $model = new Application_Model_Guestbook($formdata);
- $mapper = new Application_Model_GuestbookMapper();
- $mapper->save($model);
- $msg = '{success:true, result:{message:'Data Saved!'}}';
- }
- else {
- http_response_code(404);
- $msg = '{success:false, errors:{reason:'Login failed, try again.'}}';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement