I have an form/action that I am trying to get to redirect based on submitted values....
For some reason when I try to get my form to redirect to my url I get: Warning (2): Cannot modify header information - headers already sent by ....CORE/cake/libs/controller/controller.php, line 746 My goal is to get the form to redirect to the action and eventually include parameter values in the redirect as well. I hope I made this clear to everyone. I have included my code below. --------------------------------- action code: if (!empty($this->data['Result']['location'])) { $this->redirect(array("controller" => "results", "action" => $this->data['Result']['location'])); } ---------------------------------- form code: <?php echo $form->create('Result', array('action' => 'findrace')); echo $form->input('location',array('type'=>'select','options'=> $locations,'label'=>'Location*')); echo $form->input('season',array('type'=>'select','empty'=>'Select One','options'=>$seasons)); echo $form->input('racenum',array('type'=>'select','empty'=>'Select One','options'=>$races,'label'=>'Race #')); echo $form->input('sex',array('type'=>'select','empty'=>'Select One','options'=>array('M'=>'Male','F'=>'Female'))); echo $form->input('class',array('type'=>'select','empty'=>'Select One','options'=>$classs)); echo $form->submit(); echo $form->end(); print '<small>*required field</small>'; ?> Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en