jontic Posted April 4, 2009 Share Posted April 4, 2009 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; Quote Link to comment https://forums.phpfreaks.com/topic/152545-switch-control-function-cry-for-help/ Share on other sites More sharing options...
Zane Posted April 4, 2009 Share Posted April 4, 2009 DEFINE....not working Quote Link to comment https://forums.phpfreaks.com/topic/152545-switch-control-function-cry-for-help/#findComment-801241 Share on other sites More sharing options...
jontic Posted April 4, 2009 Author Share Posted April 4, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/152545-switch-control-function-cry-for-help/#findComment-801332 Share on other sites More sharing options...
jontic Posted April 5, 2009 Author Share Posted April 5, 2009 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] Quote Link to comment https://forums.phpfreaks.com/topic/152545-switch-control-function-cry-for-help/#findComment-801862 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.