if (isset ($_POST['somethingA']))
{
//code for doing something A
}
elseif (isset ($_POST['somethingB']))
{
//code for doing something B
}
I will need to access some data from somethingA code, into somethingB code.
How can I do that in a proper way?
Should I declare a variable outside the conditionals, work inside the conditionals, and later (bottom) I use that?
Should I work with them inside the conditionals, and, somehow, pull them out after the conditional lines?
Thanks in advance,
MEM
you may do something like you said:
If you are accesing $_POST directly consider using some sort of framework like symfony, or Zend, unless you are learning or working in a very simple(house) project.
Best of luck
David