close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Checked? in a Dynamic Radio Group

Thread began 5/31/2009 2:59 pm by Jon Gibson | Last modified 6/05/2009 9:18 am by Jon Gibson | 11602 views | 7 replies

Jon GibsonBeta Tester

Checked? in a Dynamic Radio Group

Hello:

What is working:
Dynamically generated a radio group using PHP and MySQL (with Dreamweaver built in Record Set and a loop).

What I can't get done:
How can I determine which radio button has been checked by the user?

What I have tried:
Googleing this thing to death.

I found a site that uses a checked status type thing, but that assumed the values were hard coded. I would like to maintain dynamic values if possible. Also, I realize some (maybe all:) of the php below may not be well formed . . . I am trying to learn how to use Dreamweaver's built in functionality and the generated code is throwing me a bit.
Here is my current Form code:
<form action="<?php echo $editFormAction; ?>" method="POST" name="form1" id="form1">


<?php $checkedStatus = 'unchecked'; do { ?>
<?php ?>
<input type="radio" checked="<?php print $checkedStatus; ?>" name="candidate" value="<?php echo $row_getCandidateInfo['numberVotes']; ?>" id="<?php echo $row_getCandidateInfo['id'];?>" /><?php echo $row_getCandidateInfo['candidate'] . "<br />"; ?>

<?php } while ($row_getCandidateInfo = mysql_fetch_assoc($getCandidateInfo)); ?>
<br />

<input name="vote" type="submit" value="vote" />
<input type="hidden" name="MM_update" value="form1" />
</form>

Thank you!
Jon

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...