tags:

views:

49

answers:

2

whats the best way to implement text feedback after entering the two fields and clicking SUBMIT?

http://nyu.neighborrow.com/items

+3  A: 

In your Controller you can either set

if ($this->Items->save($this->data)) {
    $this->Session->setFlash('Your data has been submitted');
    $this->redirect(array('action'=>'index'));
} else {
    $this->Session->setFlash('Error saving the data');
}

http://book.cakephp.org/view/400/setFlash

or

if ($this->Items->save($this->data)) {
    $this->flash('Your data has been submitted', '/items/', 5);
}

http://book.cakephp.org/view/426/flash

harpax
A: 

Alternatively you could redirect to a 'successful completion' page. Some third parties, like eBay, may require you to do this.

Decide how you want your application to behave and implement it that way!

Leo