Solved

Online Test

Posted on 2006-11-30
7
245 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Best way to find duplicate message in database 7 29
css border raidius issue 7 80
CSS: Element name is not scoping properly 4 73
Snap images to the bottom of a div 5 65
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now