473,320 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Quiz using php little problem

hi every body,
i have a problem dealing with a quiz system in php.

the idea is that am building a quiz system by giving a question and
choices in radio buttons, and after selecting the answer the other
question is loaded and in the final page a report is displayed showing
all questions and the correct answers and the score but the problem
here is that am not able to pass the answer of the first question to
the second page question, ....... and so on

i know the idea which is to use a hidden field but i dont know how
this is happened in a correct way.

Thanks for any help in advance

shror
www.s7els7.com

Mar 6 '07 #1
6 2076
shror wrote:
hi every body,
i have a problem dealing with a quiz system in php.

the idea is that am building a quiz system by giving a question and
choices in radio buttons, and after selecting the answer the other
question is loaded and in the final page a report is displayed showing
all questions and the correct answers and the score but the problem
here is that am not able to pass the answer of the first question to
the second page question, ....... and so on

i know the idea which is to use a hidden field but i dont know how
this is happened in a correct way.

Thanks for any help in advance

shror
www.s7els7.com
You could use a hidden field - but I think a session would be better.
Read up on sessions in the PHP doc.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Mar 6 '07 #2
On Mar 6, 4:03 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
shror wrote:
hi every body,
i have a problem dealing with a quiz system in php.
the idea is that am building a quiz system by giving a question and
choices in radio buttons, and after selecting the answer the other
question is loaded and in the final page a report is displayed showing
all questions and the correct answers and the score but the problem
here is that am not able to pass the answer of the first question to
the second page question, ....... and so on
i know the idea which is to use a hidden field but i dont know how
this is happened in a correct way.
Thanks for any help in advance
shror
www.s7els7.com

You could use a hidden field - but I think a session would be better.
Read up on sessions in the PHP doc.
That would be http://www.php.net/session
>
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================

Mar 7 '07 #3
shror schrieb:
hi every body,
i have a problem dealing with a quiz system in php.

the idea is that am building a quiz system by giving a question and
choices in radio buttons, and after selecting the answer the other
question is loaded and in the final page a report is displayed showing
all questions and the correct answers and the score but the problem
here is that am not able to pass the answer of the first question to
the second page question, ....... and so on

i know the idea which is to use a hidden field but i dont know how
this is happened in a correct way.

Thanks for any help in advance

shror
www.s7els7.com
You are looking for sessions. www.php.net/session
Mar 7 '07 #4
On Mar 7, 9:17 am, Mike Roetgers <miker...@informatik.uni-bremen.de>
wrote:
shror schrieb:
hi every body,
i have a problem dealing with a quiz system in php.
the idea is that am building a quiz system by giving a question and
choices in radio buttons, and after selecting the answer the other
question is loaded and in the final page a report is displayed showing
all questions and the correct answers and the score but the problem
here is that am not able to pass the answer of the first question to
the second page question, ....... and so on
i know the idea which is to use a hidden field but i dont know how
this is happened in a correct way.
Thanks for any help in advance
shror
www.s7els7.com

You are looking for sessions.www.php.net/session- Hide quoted text -

- Show quoted text -
Thanks for the answers but i think the hidden tags will be easier but
the problem is that i dont know if my hidden tag is correct or not
<input type="hidden" name="code" value="<? echo "$code"; ?>">

where code is a value calculated in the same page where this hidden
tag is found

Thanks once more

shror
www.s7els7.com

Mar 7 '07 #5
On Mar 8, 12:15 am, "shror" <shahi...@gmail.comwrote:
On Mar 7, 9:17 am, Mike Roetgers <miker...@informatik.uni-bremen.de>
wrote:


shror schrieb:
hi every body,
i have a problem dealing with a quiz system in php.
the idea is that am building a quiz system by giving a question and
choices in radio buttons, and after selecting the answer the other
question is loaded and in the final page a report is displayed showing
all questions and the correct answers and the score but the problem
here is that am not able to pass the answer of the first question to
the second page question, ....... and so on
i know the idea which is to use a hidden field but i dont know how
this is happened in a correct way.
Thanks for any help in advance
shror
>www.s7els7.com
You are looking for sessions.www.php.net/session-Hide quoted text -
- Show quoted text -

Thanks for the answers but i think the hidden tags will be easier but
the problem is that i dont know if my hidden tag is correct or not

<input type="hidden" name="code" value="<? echo "$code"; ?>">

where code is a value calculated in the same page where this hidden
tag is found

Thanks once more

shrorwww.s7els7.com- Hide quoted text -

- Show quoted text -
oh the reason i want to use hidden tags is that am not using database
and as much as i know the session needs database

is this correct

Thanks

Mar 7 '07 #6
Rik
shror <sh******@gmail.comwrote:
>Thanks for the answers but i think the hidden tags will be easier but
the problem is that i dont know if my hidden tag is correct or not

<input type="hidden" name="code" value="<? echo "$code"; ?>">
Lose the quotes around $code. The statement seems OK, no way t otell
unless you give us the HTML output also.
>where code is a value calculated in the same page where this hidden
tag is found

oh the reason i want to use hidden tags is that am not using database
and as much as i know the session needs database
It doesn't, the standard session implementation in php uses files.
--
Rik Wasmus
Posted on Usenet, not any forum you might see this in.
Ask Smart Questions: http://tinyurl.com/anel
Mar 7 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: C. David Rossen | last post by:
Hello: I found a script for a simple multiple choice quiz that I would like to tailor to a quiz that I want to post on a website. The quiz I want to use can be found at : ...
2
by: Sketcher | last post by:
Hi, I am trying to create a quiz, Code is as follows: <html> <head> <title>Quiz</title> </head> <BODY> <Center><TABLE cellSpacing=3 cellPadding=0 border=0>
20
by: __PPS__ | last post by:
Hello everybody in a quiz I had a question about dangling pointer: "What a dangling pointer is and the danger of using it" My answer was: "dangling pointer is a pointer that points to some...
0
by: Tim | last post by:
Dear Developers, Firstly, I'm not sure where this post should go so I apologise if this is in the wrong group or area. I'm currently interviewing for a vb.net developer who doesn't mind...
4
by: DAL | last post by:
I want to build my kid a program that cycles through questions (using a label for the question), and lets him choose one of two radio buttons for the right answer. How do I get every set of...
13
by: Kiuhnm | last post by:
How would you implement a static dictionary with macros? For example, the five lines PL_FIND(MYDICT, HOUSE) PL_FIND(MYDICT, AUTO) PL_FIND(MYDICT, THIS_IS_NOT_IN_THE_DICTIONARY)...
0
NoPeasHear
by: NoPeasHear | last post by:
I don't know what I am doing wrong... I used this tutorial... http://www.permadi.com/tutorial/flashMXQuiz/index.html It works with their quiz.xml file, but when I add an option for multiple...
1
by: gts | last post by:
Hi, I've put together a little quiz using javascript. It doesn't actually keep score, it let's you keep answering the same question until you get it right. Most of the questions use multiple choice...
1
by: korr | last post by:
Hi there, i'm trying to develop a quiz in flash. Searching on the net, I found a quiz in flashkit from sephiroth.it by Alessandro Crugnola. His quiz has a script that puts the questions and the...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.