Hi all. I'm starting to move my first steps in a personal application. By now I use a lot the given examples included in the cookbook, like the blog example.
At this page... http://book.cakephp.org/view/337/Adding-Posts ...I see a handy usage of the flash() method to show a message to the user. I wanted to use it myself, so I copied the default flash layout to my application folder and I temporarily chaged the 'debug' value to enable automatic redirects. Here is the essential code. The view: movies/add.ctp <?php Configure::write('debug',0); echo $form->create('Movie'); echo $form->input('title',array( 'label' => 'Title' )); echo $form->end('Save'); ?> and the add() method in the controller: function add() { if (!empty($this->data)) { if ($this->Movie->save($this->data)) { $this->flash('Movie saved','/movies/'); } } } So: the redirect doesnt work and the content of the page includes some messages about the sql queries, beyond my custom message (that is clickable and links to the redirect url). I guess something is not working fine. I checked the default flash layout, and I see that redirect is performed with the following. <?php if (Configure::read() == 0) { ?> <meta http-equiv="Refresh" content="<?php echo $pause; ?>;url=<?php echo $url; ?>"/> <?php } ?> Any help? Thank you, Fabio --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
