Hi there, im a uni student working on an assignment I have just been given, this is my first time using php. so far I have mostly programed in C, C++.
anyway I have been given this relatively simple assingment where i have an online personality test that someone might fill in and I am to generate a response depending on the data recived.
So far I have been able to pull the values from txt boxes etc fairly easy however im stuck on this function that has a loop generating 5 radio buttons per question, and there is about 20 questions, it looks like this :
HTML Code:
function writequestion(txt, qno)
{
document.write("<li><b> ... " + txt + "</b><br>")
document.write("Disagree")
for (i=1; i<=5; i++) {
document.write("  <input type=radio name=question[" + qno + "] value=" + i + ">" + i)
}
document.write("  Agree")
}
writequestion("is talkative", 1)
writequestion("does a thorough job", 2)
writequestion("is original, comes up with new ideas", 3)
writequestion("is helpful, unselfish with others", 4)
Im just woundering if someone can point me in the right direction with some suggestions on what variable i should be looking at capture and a general how too.. im not looking for a complete solution just somthing that can get me going in the right direction as I have been doing abit of research about value extraction from radio buttons but it all seems abit foregn.
thankyou in advance for any help you can offer.
__________________
I want to become a master programmer one day.
|