Re: [PHP] easier than switch

2003-08-09 Thread Nicholas Robinson
As, in this case, only one of the variables is non-null, then you could use the string concatenation operator and this would return what you want. i.e. type = $_POST['news'] . $_POST['dreams'] . $_POST['storys']... I think I've used the same variable name in different forms on the same page, as

Re: [PHP] easier than switch

2003-08-04 Thread Chris Shiflett
--- skate <[EMAIL PROTECTED]> wrote: > i have several forms on one page, they all submit a different variable The best solution would be to change this behavior, or at least add a consistent form variable that you plan to receive. > if(isset($_POST)) > { > $type = $_POST['news'] || $_POST['

Re: [PHP] easier than switch

2003-08-04 Thread John W. Holmes
skate wrote: okay, so i know there's an easy way to do this, and i've seen it done, sure of it. so please forgive the stupidity of my question, i don't even know where to begin to look in the archives either... i have several forms on one page, they all submit a different variable, i then want to

[PHP] easier than switch

2003-08-04 Thread skate
okay, so i know there's an easy way to do this, and i've seen it done, sure of it. so please forgive the stupidity of my question, i don't even know where to begin to look in the archives either... i have several forms on one page, they all submit a different variable, i then want to set one va