Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-28-2012, 03:26 PM   PM User | #1
Samal
New to the CF scene

 
Join Date: Nov 2012
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Samal is an unknown quantity at this point
Urgent Help Needed

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

Last edited by Samal; 11-28-2012 at 03:29 PM..
Samal is offline   Reply With Quote
Old 11-28-2012, 06:37 PM   PM User | #2
CHEWX
Regular Coder

 
Join Date: Dec 2010
Posts: 124
Thanks: 17
Thanked 6 Times in 6 Posts
CHEWX is an unknown quantity at this point
*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.
CHEWX is offline   Reply With Quote
Old 11-29-2012, 08:45 AM   PM User | #3
Samal
New to the CF scene

 
Join Date: Nov 2012
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Samal is an unknown quantity at this point
Hi Still waiting for a solution
Samal is offline   Reply With Quote
Old 11-29-2012, 09:28 AM   PM User | #4
stevenmw
Regular Coder

 
stevenmw's Avatar
 
Join Date: Jun 2007
Location: OK
Posts: 446
Thanks: 26
Thanked 30 Times in 30 Posts
stevenmw is an unknown quantity at this point
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!
__________________
--
Thanks!
stevenmw is offline   Reply With Quote
Users who have thanked stevenmw for this post:
Samal (12-01-2012)
Old 11-29-2012, 09:38 AM   PM User | #5
Custard7A
Regular Coder

 
Custard7A's Avatar
 
Join Date: Jul 2010
Location: Australia
Posts: 269
Thanks: 32
Thanked 32 Times in 32 Posts
Custard7A is an unknown quantity at this point
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.
Custard7A is offline   Reply With Quote
Users who have thanked Custard7A for this post:
Samal (12-01-2012)
Old 12-01-2012, 05:28 AM   PM User | #6
Samal
New to the CF scene

 
Join Date: Nov 2012
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Samal is an unknown quantity at this point
Quote:
Originally Posted by Custard7A View Post
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 is offline   Reply With Quote
Old 12-01-2012, 05:31 AM   PM User | #7
Samal
New to the CF scene

 
Join Date: Nov 2012
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Samal is an unknown quantity at this point
Quote:
Originally Posted by stevenmw View Post
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
Samal is offline   Reply With Quote
Old 12-01-2012, 05:32 AM   PM User | #8
stevenmw
Regular Coder

 
stevenmw's Avatar
 
Join Date: Jun 2007
Location: OK
Posts: 446
Thanks: 26
Thanked 30 Times in 30 Posts
stevenmw is an unknown quantity at this point
Through the use of PHP.
Quote:
Originally Posted by stevenmw View Post
You'll need to collect information from the form using PHP. So look into $_POST or $_GET

to give and idea
Code:
<form action="submit.php" name="">
<input type="text" name="user">
</form>

Then in submit.php you could do
PHP Code:
$user $_POST['user']; 
__________________
--
Thanks!

Last edited by stevenmw; 12-01-2012 at 05:38 AM..
stevenmw is offline   Reply With Quote
Old 12-01-2012, 05:33 AM   PM User | #9
Samal
New to the CF scene

 
Join Date: Nov 2012
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Samal is an unknown quantity at this point
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>
Samal is offline   Reply With Quote
Old 12-01-2012, 05:46 AM   PM User | #10
stevenmw
Regular Coder

 
stevenmw's Avatar
 
Join Date: Jun 2007
Location: OK
Posts: 446
Thanks: 26
Thanked 30 Times in 30 Posts
stevenmw is an unknown quantity at this point
http://www.pixel2life.com/publish/tu...p_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.
__________________
--
Thanks!
stevenmw is offline   Reply With Quote
Users who have thanked stevenmw for this post:
Samal (12-01-2012)
Old 12-01-2012, 06:32 AM   PM User | #11
Samal
New to the CF scene

 
Join Date: Nov 2012
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Samal is an unknown quantity at this point
Quote:
Originally Posted by stevenmw View Post
http://www.pixel2life.com/publish/tu...p_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
Attached Thumbnails
Click image for larger version

Name:	questionaire jpg.PNG
Views:	20
Size:	11.1 KB
ID:	11748  
Samal is offline   Reply With Quote
Old 12-01-2012, 03:26 PM   PM User | #12
stevenmw
Regular Coder

 
stevenmw's Avatar
 
Join Date: Jun 2007
Location: OK
Posts: 446
Thanks: 26
Thanked 30 Times in 30 Posts
stevenmw is an unknown quantity at this point
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...p-quiz-part-1/
__________________
--
Thanks!
stevenmw is offline   Reply With Quote
Old 12-13-2012, 07:56 PM   PM User | #13
StevenHu
Regular Coder

 
Join Date: Jun 2011
Location: CA
Posts: 105
Thanks: 0
Thanked 10 Times in 10 Posts
StevenHu is an unknown quantity at this point
To store a variable to retrieve later, use localstorage. Google it.
__________________
Steve Husting
http://iphonedevlog.wordpress.com
StevenHu is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:51 PM.


Advertisement
Log in to turn off these ads.