Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.35 KB | None | 0 0
  1. // Output JSON response if AJAX request
  2. if ($this->request->is_ajax())
  3.                 {
  4.                     $json = json_encode(
  5.                             array(
  6.                                 'success' => 'true',
  7.                                 'message' => $msg
  8.                                 )
  9.                             );
  10.                            
  11.                     return $this->response->body($json);
  12.                 }          
  13.                
  14.                 // Redirect to contact page
  15.                 $this->request->redirect('contact');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement