I have been driving myself nuts with this, any help is very much
appreciated!
I have a two page form with a review page. Each page has a submit
button that saves the data to a session and moves the user to the next
page. The review page gives the opportunity to edit the information
collected on either of the form pages. Clicking on the edit button
takes the user to an edit form that I populate using $this-
>data['Product'] = $this->Session->read('product.data'). My issue is
that I cannot get the edit form to overwrite 'product.data' with the
new information.
1 code example
function edit($type = 'data')
{
$this->set('type', $type);
$this->data['Product'] = $this->Session->read('product.data') //
populates the form just right
//and everything i do from this point on does not work
if($this->Product->validates())
{
$this->Session->delete('product.data');
$this->Session->write('product.data', $this->data['Newproduct']);
$this->redirect('confirm');
//thought that this would delete the old session, write the new form
data to the session and return to the confirm page, but it just
returns to the confirm page with the old data
}
I'm on about 12 hours trying different options and can not get it to
work. Thanks in advance for any help
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---