Need help with questionnaire form

I am trying to create a questionnaire form. The form has 20 questions with ten on page one and ten on two page.

I create the form in asp.net which works perfectly but the hosting server my company is using does not support asp.

So I have to convert to PHP. I have already created the form with all question I am using radio group button and check box group design form.

I am have problems with the code.

In asp.net C# to check for the selected radio box I can write this:

[code]double _kval;
{
_kval = knowbxlist.Items.Cast().Where(ek => ek.Selected == true).Select(ek => double.Parse(ek.Value)).Aggregate((items, item) => items + item);

      }[/code]

This allows me to iterate through radio group and whatever is selected stores the value number into _kval.

which I add to the total at the end.

How would I do something similar in PHP.

Shelby, Thanks all.

Please can you explain exactly what this piece of code does?

E.g. it loops through check boxes and places the values into a list.

Yes, exactly the values that are collected are numbers which I am using the operators += against other check boxes values which totals at end of the page. I then store all parameters values in a session to pass to the second page. I repeat this process on page two then email all answers.

Sponsor our Newsletter | Privacy Policy | Terms of Service