...

View Full Version : Urgent Help Needed



Samal
11-28-2012, 04:26 PM
Dear All ,
I am designing a free web site at Webs.com and have future plan to convert it full fledge website

My chalanges is as follows

1- I want to create /design a questionaire of 20/25 Questions

2- It will be like Multiple choice type with 4 options

3- User has to click on his choice

4- After completing the answers he has to click on Submit botton

5- Once he click on Submit botton the total score will be store in a variable

6-Here I need two option
First : the score will be store some where according to the test giver or mailed to me . so that i will mail the score to him latter

Second : Some time i have to display the total score he obtained out of 20 etc , as soon as he complete the test

7 - The questionare should be pass word protected , once user obtained password from me then can elligible to see and give the test

In webs.com there is a option to Enter HTML code in page layout section

Please plz help how can i achieve this

Regards

CHEWX
11-28-2012, 07:37 PM
*Challenges

If you want to PM me i'll give you a quote.

Coding forums generally helps people who've attempted code, you just wanting someone to write that for you.

Samal
11-29-2012, 09:45 AM
Hi Still waiting for a solution

stevenmw
11-29-2012, 10:28 AM
Just a heads up this belongs in the general Web Building side of the forum. It wil require more than html and css.

Start out by breaking everything into pieces, and looking up how to do that piece.

First you'll need html and css to design a quiz form.

You'll need to collect information from the form using PHP. So look into $_POST or $_GET

If you plan to have each quiz ask 20 random questions then you will need a large collection of questions the code can pull at any given time. So look into MySql databases. Look into pulling data randomly out of DBs. i would create a DB and insert numerous questions into it, and use php to write a script that pulls 20 questions out randomly per quiz.

You'll need to look into form validation.

And so on.

Just break it into pieces and learn each piece. I'd start with a three question quiz. Something that simply has you answer three questions, collects them, and grades it using if else statements.

I don't want to flat out code this for you. Forms are a pretty complicated part of web design. So be sure to read as muc has you can over them.

Good luck!

Custard7A
11-29-2012, 10:38 AM
Hi, welcome to Coding Forums.

A questionare can be created with simple HTML, using a form. However, submitting and handling a form submission is not in the realm of HTML. You could return the result to the screen when the user submits the form with a client-side programming language, such as Javascript. If you want to store the result for later use then that is another story again, as you would need somewhere to store the results. Password protection should be handled on the server. It is possible webs.com would allow script uploads, or maybe even a built in protection service as an option for your pages. I'm not sure.

Relying on manual email sending is usually a pretty lousy idea too.

Samal
12-01-2012, 06:28 AM
Hi, welcome to Coding Forums.

A questionare can be created with simple HTML, using a form. However, submitting and handling a form submission is not in the realm of HTML. You could return the result to the screen when the user submits the form with a client-side programming language, such as Javascript. If you want to store the result for later use then that is another story again, as you would need somewhere to store the results. Password protection should be handled on the server. It is possible webs.com would allow script uploads, or maybe even a built in protection service as an option for your pages. I'm not sure.

Relying on manual email sending is usually a pretty lousy idea too.

I got the simple code how to design questionaire ..... but after submittng how can i display or some time store it in a variable to use it latter

and also how can i use password protected questionaire

plz help or write a code of 4/5 linr for anything above \

reagrds

Samal
12-01-2012, 06:31 AM
Just a heads up this belongs in the general Web Building side of the forum. It wil require more than html and css.

Start out by breaking everything into pieces, and looking up how to do that piece.

First you'll need html and css to design a quiz form.

You'll need to collect information from the form using PHP. So look into $_POST or $_GET

If you plan to have each quiz ask 20 random questions then you will need a large collection of questions the code can pull at any given time. So look into MySql databases. Look into pulling data randomly out of DBs. i would create a DB and insert numerous questions into it, and use php to write a script that pulls 20 questions out randomly per quiz.

You'll need to look into form validation.

And so on.

Just break it into pieces and learn each piece. I'd start with a three question quiz. Something that simply has you answer three questions, collects them, and grades it using if else statements.

I don't want to flat out code this for you. Forms are a pretty complicated part of web design. So be sure to read as muc has you can over them.

Good luck!

NO i dont want to have random question selection etc ...
just simple one . when summiiting the answer two thing should happen

display the result and store the result in a variable to use latter

plz help

Regards

stevenmw
12-01-2012, 06:32 AM
Through the use of PHP.


You'll need to collect information from the form using PHP. So look into $_POST or $_GET



to give and idea


<form action="submit.php" name="">
<input type="text" name="user">
</form>



Then in submit.php you could do


$user = $_POST['user'];

Samal
12-01-2012, 06:33 AM
I got following code to design questions , i can design 20 questions maually
I just need little bit add of codes to complete my questionaire





What is JavaScript?

<FORM method="POST"
onSubmit="return checkAnswer(this,'B');"
>

<INPUT TYPE="RADIO" VALUE="A" NAME="cc">
A. Another name for Java<BR>

<INPUT TYPE="RADIO" VALUE="B" NAME="cc">
B. A scripting language mostly for the web<BR>

<INPUT TYPE="RADIO" VALUE="C" NAME="cc">
C. When you use Java without compiling<BR>

<INPUT TYPE="SUBMIT" VALUE="Submit Answer">

</FORM>

stevenmw
12-01-2012, 06:46 AM
http://www.pixel2life.com/publish/tutorials/1316/create_a_simple_php_quiz_system/

Like i said, break it into parts. Design a form with three questions or so. Then build a simple PHP script to take the answers from the quiz, and do something with it. (above I told you two commands to look into for this.)

Please be sure to wrap your code using the pound button in the post toolbar.

Samal
12-01-2012, 07:32 AM
http://www.pixel2life.com/publish/tutorials/1316/create_a_simple_php_quiz_system/

Like i said, break it into parts. Design a form with three questions or so. Then build a simple PHP script to take the answers from the quiz, and do something with it. (above I told you two commands to look into for this.)

Please be sure to wrap your code using the pound button in the post toolbar.

Now can design two question on my webs.com site with following code yes this can be extend to more no of question screenshot is also in following

HTML Code :

What is JavaScript?

<form method="POST" onSubmit="return checkAnswer(this,'B');">

<input TYPE="RADIO" VALUE="A" NAME="cc"/>
A. Another name for Java<br/>

<input TYPE="RADIO" VALUE="B" NAME="cc"/>
B. A scripting language mostly for the web<br/>

<input TYPE="RADIO" VALUE="C" NAME="cc"/>
C. When you use Java without compiling<br/>

<input TYPE="SUBMIT" VALUE="Submit Answer"/>

</form>



Who is Bill Gate ?

<form method="POST" onSubmit="return checkAnswer(this,'B');">

<input TYPE="RADIO" VALUE="A" NAME="cc"/>
A. Owner of Microsoft<br/>

<input TYPE="RADIO" VALUE="B" NAME="cc"/>
B. Owner of Facebok<br/>

<input TYPE="RADIO" VALUE="C" NAME="cc"/>
C. None of Above<br/>

<input TYPE="SUBMIT" VALUE="Submit Answer"/>

</form>

Screen shot is as follows

in the attachment

stevenmw
12-01-2012, 04:26 PM
I'm sorry Samal, but you are starting to lose me.

Just Google php quiz tutorials.

Here is a pretty good one.

http://blog.elanman.com/2009/03/make-your-own-php-quiz-part-1/

StevenHu
12-13-2012, 08:56 PM
To store a variable to retrieve later, use localstorage. Google it.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum