Re: [PHP] phpinfo()
[email protected] (Tedd Sperling)
| Newsgroups | php.general |
|---|---|
| Message-ID | <[email protected]> |
On Feb 19, 2013, at 7:57 PM, John Taylor-Johnston <[email protected]> wrote: > I cannot find button2 in phpinfo() when I click it. I was hoping to find a $_POST["button2"] value. > What am I doing wrong? > > <input type="button" name="button2" id="button2" value="Print Mode" onclick="formSubmit()"> > > I really wanted to use a button to pass a different condition than a <input type="submit"> Lot's of different ways to pass values via forms. Try using : <input type="hidden" name="button2" value=2> Then check the button2 value via a: $button2 = isset($_POST['button2']) ? $_POST['button2'] : null; That's one way -- there are many more. Cheers, tedd _____________________ [email protected] http://sperling.com