How do you make a questionaire for a webpage in javascript?

Mar 13th, 2009 | By KC | Category: JavaScript Related

I have the large plan due in my web page pattern course. as well as i wish to have the questionaire in php or javascript. plz assistance me if we know how to do either. i don't wish links, as well as i unequivocally need this.

Tags: , , , , ,

One comment
Leave a comment »

  1. Well, if you are starting learning programming this is not something you are going to be able to learn by class tomorrow.

    With that said…

    you will have to have a form…

    <form name="pageForm" method="post" action="<?php $PHP_SELF;?>">
    <input type="hidden" name="action" value="go" />
    What is your favorite color:
    <input type="radio" name="favcolor" value="1" />
    <input type="radio" name="favcolor" value="2" />
    ///… put other questions and answers as you desire
    <input type="submit" name="submit" value="Vote" />
    </form>

    <?php

    if($_POST["action"] == "go"){
    // grab all values from the form
    // insert values into database
    // maybe redirect to another page, something like thank you for your votes…. or something
    }

    ?>

    Hope this helped you to get started
    // some things that you will want to search in google for are getting values from a form in php

    Good Luck!

Leave Comment