Hey, so I'm coding a php application, and I've run into an error, which I am for some reason not seeing (me being really bad at coding and lack of sleep may have something to do with it.
Anyway, here's my tricky problem :)
Parse error: syntax error, unexpected $end, expecting T_FUNCTION
and the code:
The model
class Model_DbTable_Users extends Zend_Db_Table_Abstract
{
protected $_name = 'users';
public function addUser($username, $password, $email)
{
$data = array( 'username' => $username,
'password' => $password,
'email' => $email);
$this->insert($data);
}
and the action
public function stage1Action()
{
$form = new Form_RegisterForm;
$this->view->form = $form;
$request = $this->getRequest();
#if the form is submitted
if($request->isPost()){
#validated automatically by the form-errors echoed if invalid
if($form->isValid($this->_request->getPost())) {
$username = $form->getValue('username');
$password = $form->getValue('password');
$email = $form->getValue('email');
$users = new Model_DbTable_Users;
$users->addUser($username, $password, $email);
$this->_helper->redirector('stage2');
}
}
}
I get this action after pressing the submit button.
Any help greatly appreciated. Thanks in advance