SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Feb 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    creating a quiz... gotta make it simple and fast!

    Well, so I am n00b at javascript and gotta code a multiple choice quiz for a site. I am good at PHP and MySQL, but I want to use something else this time...

    This quiz won't be any "correct answer" one, one can choose any option for a question. The thing is next question depends on the option you have chosen now... so, after a series of questions, we decide something based on all responses given before...

    So, is using Javascript a good idea? Can we use AJAX for this purpose?

    The question is which option will make it easy and I want a pointer which I can reference and start writing the code... using PHP would be fast since I know it, but I am thinking of learning something in the process, that's why...

  2. #2
    SitePoint Mentor silver trophybronze trophy
    Mikl's Avatar
    Join Date
    Dec 2011
    Location
    Edinburgh, Scotland
    Posts
    1,441
    Mentioned
    58 Post(s)
    Tagged
    0 Thread(s)
    You already know PHP, but you're new to Javascript. So it will surely be faster to do the job in PHP. But if your main interest with this project is as a training exercise for Javascript, then that would be OK as well. From what you've told us, it sounds like a fairly simple bit of procedural code, which should be easily do-able in either language.

    One possible problem with Javascript is that it won't be as secure as PHP for this particular job. In other words, it would be theoretically possible for a knowledgeable person to cheat, by studying the JS code. That might not be an issue, but it's worth keeping in mind.

    As for Ajax, you certainly don't need to use that for the project you've described. But, again, if you're interested in using this project to learn Ajax, but all means give it a go.

    Mike

  3. #3
    SitePoint Member
    Join Date
    Feb 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mikl View Post
    One possible problem with Javascript is that it won't be as secure as PHP for this particular job. In other words, it would be theoretically possible for a knowledgeable person to cheat, by studying the JS code. That might not be an issue, but it's worth keeping in mind.
    Yes, that sure is an issue with Javascript quizzes, but I guess like you said that won't be a problem as this quiz has nothing like correct answer... but it could be a problem in the sense that any n00b can copy the code, and use it as their own...

    Thanks for the help... I guess I will go with PHP...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •