Is there a way to change a $_GET variable while using $this->render(‘view’) in a controller? I can use $this->redirect to do what I am trying to do (reload the page with no $_GET variable), but then I cannot pass $_POST data, which is less than optimal. Or is there something I’m missing?
Hmm, possibly. Maybe I’m just doing this the completely wrong way. Here’s what I’m trying to do: I have a view with a form, and I want to intially show the form with all fields disabled. If the user clicks an ‘edit’ link, the disabled attribute is removed from all fields.
If I call $this->render(…) instead of $this->redirect($url), the $_GET variable stays set. If I call $this->redirect($url), the $_GET variable disappears, but then I can’t (or don’t know how to) pass the ‘status’ variable (the $status variable will trigger a message telling users whether the save was successful or not) - unless, there’s a way to make that display if the model doesn’t have any error messages.
Or maybe the way I’m doing this is just making it a lot more complicated than it needs to be