By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,780 Members | 1,520 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,780 IT Pros & Developers. It's quick & easy.

Quiz using php little problem

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.