473,563 Members | 2,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2088
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*******@attgl obal.net
=============== ===
Mar 6 '07 #2
On Mar 6, 4:03 pm, Jerry Stuckle <jstuck...@attg lobal.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...@attgl obal.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...@infor matik.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...@infor matik.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
9202
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 : http://mtl.math.uiuc.edu/users/C2Schult/quiz2.html Here is my problem. I want to be able to use answers with more than one word or number which requires spaces. ...
2
2627
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
6535
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 area of ram that's not reserved by the program. Accessing memory through such pointer is likely to result in core dump (memory access violation)"
0
1023
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 prototyping the client requirements using MS Access. We've not had much luck in finding many suitable people through agencies and those that I have...
4
7457
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 questions and answers to cycle through until the last question? Also, how can I give him the score after the last question. Thank you in advance. DAL. ...
13
2008
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) PL_FIND(MYDICT, jhgjhguytuyhkgjhg) PL_FIND(MYDICT, 3498fjkhdlkh34098jhf)
0
4570
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 correct answers, the results page always gives me a response of 0. What would I change from the tutorial to have multiple correct responses reflect...
1
1710
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 radio buttons and I have them working fine. One of the questions requires the user to enter a letter into 5 text input fields. The user has to enter...
1
3077
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 answers in random order. What i'm looking for is to not select the answers by clicking the mouse, but using the keyPress handler. Using the keyPress...
0
7659
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8103
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7634
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7945
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6244
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5481
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5208
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3618
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.