Jump to content

i need to make a simple voter!!


wilsonf1

Recommended Posts

hi i need to make a poll basically where there are 10 answers, an email address field... thats itif all my radio buttons are named "answer" - on the insert into statement, how do i get answerX to have 1 added to it and all the rest a 0 ive got this:<input type="radio" name="answer" value="1" /><input type="radio" name="answer" value="2" />then on the vote page i was gonna set all the answers to 0answer1 = "0"answer2 = "0"answer3 = "0"answer4 = "0"answer5 = "0"answer6 = "0"answer7 = "0"answer8 = "0"answer9 = "0"answer10 = "0"then some how i need to say after that bit, no wait.... answer5 for instance has a 1 on it and therefore that what will be added to the DB?i previously had the radio buttons each NAMED differently like name="answer1" and then just inserted all answers to the db.... the problem was having a unique name meant more than one radio could be chosen... perhaps javascript could help?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...