09-18-2008, 09:14 AM
[eluser]BaRzO[/eluser]
stensi i have a problem to show errors
in your example i have added
echo $this->error->username;
but i can not touch to error message
i get PHP error
Thanks for reply...
stensi i have a problem to show errors
in your example i have added
echo $this->error->username;
but i can not touch to error message
i get PHP error
Quote:A PHP Error was encountered
Severity: Notice
Message: Undefined property: Examples::$error
Filename: controllers/examples.php
Line Number: 105
Code:
// Save User
if ($u->save())
{
echo '<br />';
echo '<p>Current values:</p>';
echo '<code><strong>ID</strong>: ' . $u->id . '<br />' .
'<strong>Username</strong>: ' . $u->username . '<br />' .
'<strong>Email</strong>: ' . $u->email . '<br />' .
'<strong>Password</strong>: ' . $u->password . '<br />' .
'<strong>Salt</strong>: ' . $u->salt . '</code>';
}
else
{
echo '<p><b>User has already been created</b></p>';
echo $this->error->username;
}