Re: phpinfo()
| From: | Stuart Dallas | Date: | Wed, 20 Feb 2013 19:31:18 +0000 |
| Subject: | Re: phpinfo() | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-320271@lists.php.net to get a copy of this message | ||
On 20 Feb 2013, at 19:23, John Taylor-Johnston <John.Taylor-Johnston@cegepsherbrooke.qc.ca>
wrote:
>
>
> Design in Motion Webdesign wrote:
>>
>>>
>>>
>>> John Taylor-Johnston <John.Taylor-Johnston@cegepsherbrooke.qc.ca> 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">
>>>
>>> Use a different value or name on the <input type="submit"/> button.
>>> Don't use JavaScript to trigger the form like that. Its not necessary and will bite you in the
>>> ass if ypu get a visitor who browses without JavaScript, which can include security aware users,
>>> blind users, etc
>>> Thanks,
>>> Ash
>>> http://www.ashleysheridan.co.uk
>>>
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>
>> Try $_POST['button2']
>>
>> Best regards.
>> Steven
>>
>
> $_POST['button2'] does not exist. I'm using radio to get aorund it for now.. A
> button would have been cleaner.
You were given the answer, did you not try it?
Starting with the code in your original post:
1) Change the type to submit.
2) Remove the onclick.
3) Job done!
-Stuart
--
Sent from my leaf blower