I am creating an opencart module for my site and have a page for which I need the Refresh button and the continue button, where I POST either myself (in the case of the Refresh button or to bespoke2.php with the continue button. I added a controller and views below. Unfortunately, when the Continue button is clicked, I am redirected to the correct page, however the POST variables do not come with it. The refresh button works well. Can someone tell me where I can go wrong, I spent hours playing with him and looking for a forum, but google didn’t come up with a lot?
This is form.php
<form name="frm" method="POST" action=""> <input type="text" name="size_width"> <input type="submit" name="submit1" class= "button" Value="<?=$button_continue?>" /> <input type="submit" name="submit2" class= "button" Value="<?=$button_refresh?>" />
This is the controller.php file
if (isset($this->request->post['submit1'])) { $this->response->redirect($this->url->link('module/bespoke2')); } elseif (isset($this->request->post['submit2'])) { $this->data['input_width'] = ($this->request->post['size_width']); else{}
This is the code for the bespoke2.php controller
$this->data['input_width'] = ($this->request->post['size_width']);
Does redirecting seem to not tolerate POST? Any help is greatly appreciated.
source share