/    Sign up×
Community /Pin to ProfileBookmark

A problem with radio buttons…

Hi, I hate to bring up what probably is such a stupid mistake but I am using this code:
[FONT=Courier New]
<form name=”sign_up”>

<input type=”radio” name=”subscribe” checked=”checked” />Subscribe&nbsp;<input type=”radio” name=”unsubscribe” />Unsubscribe

</form>[/FONT]

It’s actually all in a table but I you don’t need to see all the code ?, So what is happening is when I test it and check one of the buttons, the one I check goes on, and the other stays on aswell! also it won’t turn off again, please help me, Tom.

to post a comment
HTML

5 Comments(s)

Copy linkTweet thisAlerts:
@CharlesAug 07.2005 — &lt;form action="sign-up.pl"&gt;
&lt;fieldset&gt;
&lt;legend&gt;Sign up&lt;/legend&gt;
&lt;label&gt;&lt;input checked name="subscribe" type="radio" value="subscribe"&gt;Subscribe&lt;label&gt;
&lt;label&gt;&lt;input name="subscribe" type="radio" value="unsubscribe"&gt;Unsubscribe&lt;/label&gt;
&lt;button type="submit"&gt;Submit&lt;/button&gt;
&lt;/fieldset&gt;
&lt;/form&gt;
Copy linkTweet thisAlerts:
@Tom_BeersauthorAug 07.2005 — Wow, thanks alot, that has been annoying me for awhile, but what makes your work, which tag, the <fieldset>, <label> or what?
Copy linkTweet thisAlerts:
@Stephen_PhilbinAug 07.2005 — They must have the same name attribute values. You use the name attribute values to group them.
Copy linkTweet thisAlerts:
@Tom_BeersauthorAug 07.2005 — Yes! sorted, thanks again ?, Tom.
×

Success!

Help @Tom_Beers spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...