Jump to content

switch control function cry for help!


jontic

Recommended Posts

i have an assignment i must do!!!! :)

i try to generate HTML with Php in order to create a questionnaire.

i have one open question, one mc question with one possible answer, one mc question with multiple answers possible and a likert scale question. i need to do this using a switch control function. This is what i have so far, but it's not working.. if anyone have any idea how i can make it work proper... i would be so greatfull!!! :) please help me out :)

thanks.

 

switch ($question_attributes['type'])

{

case 'open':

$r .= q_question_open(

$question_name,

$question_attributes['stam'],

striplashes($answers[$question_name])

);

break;

 

case 'mc_one':

$r .= q_question_mc_one(

$question_attributes['stam'],

$question_attributes['options'],

$answers[$question_name]

);

break;

Link to comment
https://forums.phpfreaks.com/topic/152545-switch-control-function-cry-for-help/
Share on other sites

this function supouse to give an return of failure in case of a wrong selection or a positive responce in a case of good selection, but... it seems that i have some kind of syntax error in the code, and i cant figure which, so i was wandering maybe someone can help me with that... im really new into this all php thing and i have a serious lack of basic knowledge in it, but since it is an assignment ive got from school then my clock is ticking...  ::)  ??? what can i do?!?! heh.

ok, these are the files with the source codes...

they might be helpful for the problem i have. the problem is in the part where i need to put my switch control function.

with these files i should generate html with php and make a short questionnaire. the changes should be made in the q4.inc document and should be tested with the qtest4 document. some of the instructions are also in the files. I think the codes are almost complete, i do not know what i am doing wrong or what is missing.

every kind of help/suggestions/tips/hints are more than welcome!!

please help me out, i'm desperate! thank you!

 

[attachment deleted by admin]

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.