Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Online Test

Posted on 2006-11-30
7
Medium Priority
?
252 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

722 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