I'm in the same boat as Dewayne.

If you are on the edit page for that product and click submit doesnt
the product id get passed into the controller?  If so then the
redirect specified
 $this->redirect(array('controller' => 'compatibles', 'action' =>
'index',
'product_id' => $product_id));

should put you on /compatibles/index/$product_id with $product_id
being something like 123

If the product id doesn't get passed back to the controller how would
you go about making that happen?



On Dec 17, 5:57 pm, Miles J <[email protected]> wrote:
> Redirect does not redirect you to the previous page. If you don't have
> the ID to the page you want to redirect to, then you cant redirect to
> it.
>
> You need to save that ID somewhere if you want to use it.
>
> On Dec 17, 2:01 pm, Dewayne Pinion <[email protected]> wrote:
>
> > No luck so far. The http_referrer just stayed on the edit page. Using the
> > code below, I saw null. I did see in the code that I had $id instead, but
> > when I echoed it the id was the related product that I was editing, not the
> > main product page.
>
> > On Thu, Dec 17, 2009 at 4:48 PM, Andras Kende <[email protected]> wrote:
> > > echo 'product_id is: ' . $product_id;
> > > die();
>
> > --
> > Dewayne Pinion
> > Web/Software Guy
> > Trenton Technologyhttp://www.trentontechnology.com

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 [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

Reply via email to