Form and $_POST
Permalink 1 user found helpful
Hi
I'm trying to pass a variable by FORM, from one page to another in c5.
So i used "PHP Simple Block" and I wrote:
Then when i'm redirected to page "dodaj-produkt" and i just try to see if there is any value in POST (echo $_POST) i have empty 'Array'.
Can someone help me with this ? Maybe i'm doing something wrong in code, or is there some special way to post values from one page to another ?
I'm trying to pass a variable by FORM, from one page to another in c5.
So i used "PHP Simple Block" and I wrote:
<FORM action="my_page/concrete/index.php/wybierz-produkt/dodaj-produkt" method="post" > <select name="combobox"> <option name="classic" value="<?php if(isset($_POST['classic'])){ echo $_POST['classic'];} ?> ">Gitara klasyczna</option> <option name="acoustic" value="<?php if(isset($_POST['acoustic'])){ echo $_POST['acoustic'];} ?> ">Gitara akustyczna</option> </select> <input type="submit" value="Next" /> </form>
Then when i'm redirected to page "dodaj-produkt" and i just try to see if there is any value in POST (echo $_POST) i have empty 'Array'.
Can someone help me with this ? Maybe i'm doing something wrong in code, or is there some special way to post values from one page to another ?
I did everything wrong :) There's working part of code:
and at next page you just have to use by example