Created
October 18, 2009 20:31
-
-
Save pascaldevink/212827 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function signupAction() { | |
$this->view->title = 'Signup'; | |
$form = new SignupForm('/user/signup'); | |
$this->view->formResponse = ''; | |
if ($this->_request->isPost()) { | |
if ($form->isValid($_POST)) { | |
$signupdate = new Zend_Date(); | |
$client = new Zend_Rest_Client('http://localhost:8080'); | |
$data = array('surname'=>$this->_getParam('firstname'), | |
'infix'=>$this->_getParam('infix'), | |
'lastname'=>$this->_getParam('lastname'), | |
'email'=>$this->_getParam('email'), | |
'signupdate' => $signupdate->toString('yyyy-MM-dd hh:mm:ss')); | |
$response = $client->restPost('/yourapp/signups', $data); | |
} else { | |
$this->view->formResponse = 'Sorry'; | |
} | |
} | |
$this->view->form = $form; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment