RE: [PHP] Radio Button Value not passing
| From: | Michael Geier | Date: | Thu, 26 Oct 2000 15:31:10 +0000 |
| Subject: | RE: [PHP] Radio Button Value not passing | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-22151@lists.php.net to get a copy of this message | ||
This is actually basic HTML.
The radio button is not passed if there is no value (same with checkbox), so
radio/checkbox that are negative do not return 'no'.
IE:
<form....>
<input type=radio value=1 name=num1 checked>
<input type=radio value=2 name num2>
</form>
returns the following GET METHOD URL
http://someurl.domain.com?num1=1
if num2 was checked,
http://someurl.domain.com?num1=1&num2=2
-----Original Message-----
From: Mark Roedel [mailto:roedelm@letu.edu]
Sent: Thursday, October 26, 2000 9:17 AM
To: Michael Conley; php-general@lists.php.net
Subject: RE: [PHP] Radio Button Value not passing
> -----Original Message-----
> From: Michael Conley [mailto:mconley@eGroupBenefits.com]
> Sent: Wednesday, October 25, 2000 5:27 PM
> To: 'php-general@lists.php.net'
> Subject: [PHP] Radio Button Value not passing
>
>
> I am displaying several options via a radio button for a user to
> choose on a
> PHP page, which should forward the value of the radio button chosen to the
> next PHP page. However, the value of the radio button is not making it to
> the second PHP page. $wow and $wow2 in the following piece of code are
> defined through an SQL query earlier. I can do a "print "$wow $wow2";" on
> this page and they print fine.
>
> Here is the code:
>
> <input type="radio" name="radiopropnumhtmlv" value="<? echo
> $wow; ?>"><?
> $wow2; ?>
>
> What am I doing wrong? In the next page (called by "<form method="post"
> action="newuser.php">"), I can access all of the other variable that were
> assigned on the original page (those are input type="text"), but not the
> value of this radio button ($radiopropnumhtmlv).
This is probably a stupid question (I hope), but the radio button definitely
occurs between the <form method="post"...> tag and its corresponding </form>
tag, right?
Beyond that, have you tried viewing source for the form page in your browser
to make sure the variables are getting expanded the way you expected? Have
you double-checked the result page to make sure you're not simply having
some sort of problem with variable scope?
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer | at himself, for he shall never cease
LeTourneau University | to be entertained."
Longview, Texas, USA | -- John Powell
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net