html - Suggestions for differentiating which Q a user would like to answer -


i trying make user can choose question want answer, and, using textarea, answer question. i'm having trouble figuring out how can differentiate question user wants answer. i've tried copying html code textarea form variable, , printing foreach keys %hash, wind syntax errors on place. perl code takes each question in separate .txt file , stores them hash in form of question/answer pairs. if question doesn't have answer, value undef., believe. have suggestions? i'm not asking direct answer, rather guidance more experienced or insightful programmers. advice appreciated. thanks! here important code:

perl:

my @qa_list = ($pagev->listfile($anslist), $pagev->listfile($unanslist)); %questions = map { split(/\t/, $_, 2) } @qa_list; $answer = $cgi->param('answer');  $questionslist = join("<br>", @qa_list); $aselect = $cgi->param('select'); 

html:

<form action="/home/megaoff/www/viewquestions.dhtml" method="post"> add answer: <br> <textarea rows="1" cols="50" name="answer"> add answer here </textarea> <input type="submit" value="submit"/> </form> </body> </html> 

it's little scattered right now, because i'm still experimenting things. hope gist there: suggestions differentiating question user wants answer.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -