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
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.

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.