Survey Program - Need Advice

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dan

    Survey Program - Need Advice

    Hi,

    I want to migrate a survey program to web application and have selected
    PHP to use a on the server end along with apache and firebird rdms. As
    developing a web application is much different than a standard app I
    have some questions:

    1) The survey has 50 questions with answers being 1-10. Is it best to
    store all 50 questions and corresponding answers in a javascript array
    and then up all in a batch update? The downside to this approach is the
    user could lose all responses to survey questions if the client computer
    web browser crashed.

    2) After authenticating the user, how do I keep track of the rating
    session to guard it from hacking? Do I just store the username in a
    javascript variable since there is really no constant connection to the
    server?

    TIA,
    Dan
  • Geoff Berrow

    #2
    Re: Survey Program - Need Advice

    I noticed that Message-ID: <sfwRc.64481$6t 1.36032@twister .rdc-kc.rr.com>
    from Dan contained the following:
    [color=blue]
    > 1) The survey has 50 questions with answers being 1-10. Is it best to
    >store all 50 questions and corresponding answers in a javascript array
    >and then up all in a batch update? The downside to this approach is the
    >user could lose all responses to survey questions if the client computer
    > web browser crashed.[/color]

    How about splitting the survey up? 5 pages with 10 answers on each.
    With an indicator of how many questions are to come. Store results in
    the database after every 10.[color=blue]
    >
    >2) After authenticating the user, how do I keep track of the rating
    >session to guard it from hacking? Do I just store the username in a
    >javascript variable since there is really no constant connection to the
    >server?[/color]

    Store the information in session variables. You shouldn't use
    Javascript for anything critical. Fine if you want to use to improve
    usability but your pages should be designed to work if it is switched
    off.

    --
    Geoff Berrow (put thecat out to email)
    It's only Usenet, no one dies.
    My opinions, not the committee's, mine.
    Simple RFDs http://www.ckdog.co.uk/rfdmaker/

    Comment

    • steve

      #3
      Re: Survey Program - Need Advice

      "Dan" wrote:[color=blue]
      > Hi,
      >
      > I want to migrate a survey program to web application and have
      > selected
      > PHP to use a on the server end along with apache and firebird rdms.[/color]
      [color=blue]
      > As
      > developing a web application is much different than a standard app[/color]
      I[color=blue]
      > have some questions:
      >
      > 1) The survey has 50 questions with answers being 1-10. Is it[/color]
      best[color=blue]
      > to
      > store all 50 questions and corresponding answers in a javascript[/color]
      array[color=blue]
      >
      > and then up all in a batch update? The downside to this approach[/color]
      is[color=blue]
      > the
      > user could lose all responses to survey questions if the client
      > computer
      > web browser crashed.
      >
      > 2) After authenticating the user, how do I keep track of the rating[/color]
      [color=blue]
      > session to guard it from hacking? Do I just store the username in[/color]
      a[color=blue]
      > javascript variable since there is really no constant connection to
      > the
      > server?
      >
      > TIA,
      > Dan[/color]

      It is a one-time deal, then take a look at surveymonkey or some other
      things like that. They have already one the hard work for $20.
      Cannot beat it for a one-time survey.

      --
      http://www.dbForumz.com/ This article was posted by author's request
      Articles individually checked for conformance to usenet standards
      Topic URL: http://www.dbForumz.com/PHP-Survey-P...ict137650.html
      Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=459975

      Comment

      • Dan

        #4
        Re: Survey Program - Need Advice

        On 8/8/2004 5:50 PM, steve wrote:
        [color=blue]
        > "Dan" wrote:[color=green]
        > > Hi,
        > >
        > > I want to migrate a survey program to web application and have
        > > selected
        > > PHP to use a on the server end along with apache and firebird rdms.[/color]
        >[color=green]
        > > As
        > > developing a web application is much different than a standard app[/color]
        > I[color=green]
        > > have some questions:
        > >
        > > 1) The survey has 50 questions with answers being 1-10. Is it[/color]
        > best[color=green]
        > > to
        > > store all 50 questions and corresponding answers in a javascript[/color]
        > array[color=green]
        > >
        > > and then up all in a batch update? The downside to this approach[/color]
        > is[color=green]
        > > the
        > > user could lose all responses to survey questions if the client
        > > computer
        > > web browser crashed.
        > >
        > > 2) After authenticating the user, how do I keep track of the rating[/color]
        >[color=green]
        > > session to guard it from hacking? Do I just store the username in[/color]
        > a[color=green]
        > > javascript variable since there is really no constant connection to
        > > the
        > > server?
        > >
        > > TIA,
        > > Dan[/color]
        >
        > It is a one-time deal, then take a look at surveymonkey or some other
        > things like that. They have already one the hard work for $20.
        > Cannot beat it for a one-time survey.
        >[/color]

        Unfortunately, surveymonkey can not provide the functionality I need.
        Specifically, this is an internal survey the evaluates my company's
        suppliers with a one person answering the same set of questions for 50
        suppliers; therefore that person will be completing 50 surveys of the
        same type. I don't see an easy way to do this with surveymonkey or others.

        Dan

        Comment

        • CJ Llewellyn

          #5
          Re: Survey Program - Need Advice

          "Geoff Berrow" <blthecat@ckdog .co.uk> wrote in message
          news:4p4dh013b5 u96udcks6nngeqs 6n5cd28d1@4ax.c om...[color=blue]
          > I noticed that Message-ID: <sfwRc.64481$6t 1.36032@twister .rdc-kc.rr.com>
          > from Dan contained the following:
          >[color=green]
          > > 1) The survey has 50 questions with answers being 1-10. Is it best to
          > >store all 50 questions and corresponding answers in a javascript array
          > >and then up all in a batch update? The downside to this approach is the
          > >user could lose all responses to survey questions if the client computer
          > > web browser crashed.[/color]
          >
          > How about splitting the survey up? 5 pages with 10 answers on each.
          > With an indicator of how many questions are to come. Store results in
          > the database after every 10.[/color]

          I agree with splitting the servey up, but the data should be stored in a
          session variable until ready to commit to the database.

          If the user aborts the servey mid stream you end up with very screwed up
          results.

          To the OP, under no circumstances should you rely on client side, i.e.
          Javascript code to do validation.
          [color=blue][color=green]
          > >2) After authenticating the user, how do I keep track of the rating
          > >session to guard it from hacking? Do I just store the username in a
          > >javascript variable since there is really no constant connection to the
          > >server?[/color][/color]

          Just add the user name to the session data and check that you receive the
          correct user name against the session id for each page request.




          Comment

          • Dan

            #6
            Re: Survey Program - Need Advice

            On 8/9/2004 3:50 AM, CJ Llewellyn wrote:
            [color=blue]
            > "Geoff Berrow" <blthecat@ckdog .co.uk> wrote in message
            > news:4p4dh013b5 u96udcks6nngeqs 6n5cd28d1@4ax.c om...
            >[color=green]
            >>I noticed that Message-ID: <sfwRc.64481$6t 1.36032@twister .rdc-kc.rr.com>
            >>from Dan contained the following:
            >>
            >>[color=darkred]
            >>> 1) The survey has 50 questions with answers being 1-10. Is it best to
            >>>store all 50 questions and corresponding answers in a javascript array
            >>>and then up all in a batch update? The downside to this approach is the
            >>>user could lose all responses to survey questions if the client computer
            >>> web browser crashed.[/color]
            >>
            >>How about splitting the survey up? 5 pages with 10 answers on each.
            >>With an indicator of how many questions are to come. Store results in
            >>the database after every 10.[/color]
            >
            >
            > I agree with splitting the servey up, but the data should be stored in a
            > session variable until ready to commit to the database.
            >
            > If the user aborts the servey mid stream you end up with very screwed up
            > results.
            >
            > To the OP, under no circumstances should you rely on client side, i.e.
            > Javascript code to do validation.
            >
            >[color=green][color=darkred]
            >>>2) After authenticating the user, how do I keep track of the rating
            >>>session to guard it from hacking? Do I just store the username in a
            >>>javascript variable since there is really no constant connection to the
            >>>server?[/color][/color]
            >
            >
            > Just add the user name to the session data and check that you receive the
            > correct user name against the session id for each page request.
            >
            >
            >
            >[/color]

            Where can I see an example of using session variables like this? I have
            never used them as I am a newbie.

            Thanks,
            Dan

            Comment

            Working...