ERROR:
Fatal error: Call to a member function setGuestName() on a non-object in IndexController.php
{main}( ) - index.php
Mage::run( ) - index.php(line:87)
Mage_Core_Model_App->run( ) - Mage.php(line:684)
Mage_Core_Controller_Varien_Front->dispatch( ) - App.php(line:354)
Mage_Core_Controller_Varien_Router_Standard->match( ) - Front.php(line:172)
Mage_Core_Controller_Varien_Action->dispatch( ) - Standard.php(line:250)
Test_Contacts_IndexController->postAction( ) - Action.php(line:418)
My code:
$model = Mage::getModel('contacts/contacts');
$model->setGuestName( trim($post['name']) );
$model->setGuestEmail(trim($post['email']));
$model->setGuestTelephone(trim($post['telephone']));
$model->setGuestComments(trim($post['comment']));
$model->setGuestAttachment(trim($post['attachment']));
$model->save( );