Solved

Online Test

Posted on 2006-11-30
7
248 Views
Last Modified: 2010-04-06
Hello guys:
I’m currently working on a website and I will like to create an online quiz for customers, the quiz will have 10 questions and will have textboxes for the user to enter email, first name, last name and the answers. I will give them the answer and then 4 multiple choice for them to choose and a text box for them to enter the answer:

1) Which Country singer is nicknamed the "Gentle Giant."
 
A) Porter Wagoner
B) Jim Ed Brown
C) Bobby Bare
D) Don Williams

 Whenever they summit the test the script will make sure that all the questions were answer and that the email, first and last fields have been enter, if the user is missing something they will get a page showing them what fields are missing.

The next step is to save that info to a csv file on my ftp site I will like to include the following fields: Date, email, first, last, a1,a2,a3,a4,a5,a6,a,7,a8,a9,a10 to the cvs file and every time users take the test keep appending data to that file.

Then last stepis to send an email to the user showing them that they either answer all of the questions right or showing them which answers the mist and what the correct answer is.

I’m not to sure what script language to use. I’m good with html, average with java and don’t know too much about cgi or perl.

I need some guidance on how to accomplish this task. I really appreciate any tips or ideas

Thanks in advance.
0
Comment
Question by:Oneill0003
  • 4
  • 3
7 Comments
 
LVL 5

Expert Comment

by:dasmaer
ID: 18046214
if you're good with HTML and know some Java then I'd go with PHP (sounds odd right?).

PHP is really easy to pick up and is much like C (Java is also like C). In PHP handling files is easy, and getting form values is even easier.

Java is also good, but you'd need JSP's and servlets to get it going, if you install Resin then the deployment becomes easier than Apache with PHP.

If you want something easy to learn go with PHP, if you want to get going quickly with your existing knowledge get Resin.

D
0
 

Author Comment

by:Oneill0003
ID: 18046395
Thanks for the tip dasmaer, but I forgot to mention that at this moment we do not host our website in house and we don’t have much access to the back end of the site, as far as I know we are running MySQL 4.0 and the language used is EASY language very old and almost out dated. So with that in mind I really can’t use PHP since at this moment I cannot install a compiler on the server. What about creating the form using CGI? I don’t know much about it but will not mind learning it.
0
 
LVL 5

Expert Comment

by:dasmaer
ID: 18046466
CGI is a technology rather than a language. Common Gateway Interface if memory serves me right.  What it does is get the webserver to run requests past a system such as PHP, the JVM or Perl and then stream the result over HTTP.

You'd need to get something installed on the server to do the legwork, old CGI stuff was written in C and then Perl... after perl people stopped calling it CGI and started instead of refering to the scripting language in use.  If you are on a Windows Server with IIS5(or over), then you will almost certainly have VBS installed so you can use ASP (unless you have a very paranoid Network Admin).

If the server is Apache and its on Unix, then you'll almost certainly have Perl somewhere already (I'd be shocked if it wasn't there).  Because you're using MySQL the odds are you're server in UNIX of some flavour and Perl is the way forward for you.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:dasmaer
ID: 18046487
Of course, there is always the possibility that you're on Windows with Apache as the server, or another HTTP server I've not mentioned. If that is the case, see if you can get your Admin to install Apache with PHP as its free.
0
 

Author Comment

by:Oneill0003
ID: 18046614
So you really don’t write CGI code you use CGI to run PERL code right?

Once again I apologies for not given all the specs from the beginning, our website is hosted on a Linux server running Red Hat 8.0 and like I said earlier we are using MySQL 4.0, I have a guy in staff that is really good with Linux and we are able to log to the back end whenever we need something. So the question is what should I look for to be able to run PERL scripts in this server, and really how do I get started on my script?

Thanks for your help!
0
 
LVL 5

Accepted Solution

by:
dasmaer earned 500 total points
ID: 18046757
What you need is the CGI.pm (perl modules) as these will sort out all of the HTTP transactions you need. These come pre-installed on Red Hat so you'll be fine, an example Hello World would be:

#!/usr/bin/perl                #this is the path on the server to where perl can be found, an alternative is /bin/perl

use CGI qw/:standard/;   #tells perl we're doing HTTP
print header,                  #print HTTP headers
start_html('Hello World'),# output some html
h1('CGI.pm is simple.'),  #and more
end_html;                     #end html

See: http://perl.about.com/od/cgiweb/a/perlcgipm.htm for the full example.  You can also google for "Perl CGI" and you'll get a lot of hits back. I first started Perl at College and I learnt from the Book "Sams Teach Yourself Perl in 21 days", which puts Perl into 21 lessons which take about 30 mins to read each.

Good luck.
0
 

Author Comment

by:Oneill0003
ID: 18048338
Great info!
Thanks for your help.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question