Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //index.php
- ...
- if($_POST){
- $vars['post'] = $_POST;
- var_dump($vars);
- }
- call_user_func_array(array($controller, $action), $vars);
- //someController.php
- ....
- $vars = array();
- if (isset($params['post'])) {
- $this->model = new Contact();
- $em = EMF::build();
- var_dump($params['post']);
- $variables = $params['post'];
- $this->model->setName($variables['name']);
- $this->model->setEmail($variables['email']);
- $this->model->setTelephone($variables['phone']);
- $this->model->setMessage($variables['message']);
- $em->persist($this->model);
- $em->flush();
- $vars['message'] = "Your query has been successfully submitted!";
- }
- var_dump($vars);
- var_dump($params);
- .....
- //output
- array(1) { ["post"]=> array(4) { ["name"]=> string(13) "DwBoothe" ["email"]=> string(16) "testing@test.com" ["phone"]=> string(11) "18766765449" ["message"]=> string(1) "t" } } array(0) { } array(4) { ["name"]=> string(13) "DwBoothe" ["email"]=> string(16) "testing@test.com" ["phone"]=> string(11) "18766765449" ["message"]=> string(1) "t" }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement