Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_php thread: PHP and Javascript


Message #1 by "Wojciech Pirog" <moharo@h...> on Fri, 7 Mar 2003 11:49:34
i'm working on the examination system... can i use php to refer to form 
values/elements? ( remember that there is NO submit in <form> ). Here's 
how it goes - i have for example 20 questions in the database which are 
dispayed on the web page in the following format:


1. Question body ....

   <input radio....>
   <input radio....>

2. Question2 body .... and so forth

user has a ability to select number of questions per page and be able to 
navigate thru them. ( check www.voytech.coolfreepages.com/exams ). now i 
want to be able to somehow store the values that the user has clicked so 
that when user will get back to that page, values that he has selected 
will be SELECTED :)

i was thinking about using javascript to scan thru all the forms, then 
pick the values, and then generate appropriate link... passing values thru 
GET method for example: test.php?q1ans=1&q2ans=2 ... etc. 

Please note that i have a naming convention with radio buttons for 
example: In question number 1, first radio button will have a value "1#1", 
second radio will have a value "1#2" and so forth... 

IF YOU GUYS HAVE ANY SUGGESTIONS HOW CAN I DO IT - PLEASE REPLY. PEACE  

  Return to Index