php script on personality test

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • joshuatorres10
    New Member
    • Aug 2010
    • 2

    php script on personality test

    hello is there anyone who could help me with scripting the personality test im making..it does not calculate the numbers that should be grouped..im not sure why..pls help me..
    Attached Files
  • johny10151981
    Top Contributor
    • Jan 2010
    • 1059

    #2
    you have syntax error, in your php page
    check line 120

    if ($q1==eia)

    what is eia you have error like this.

    Besides there is another problem with exception handling. what if user skip any answer choose none of the answer? it will create "Undefined Index" error where you receiving POST value.

    Comment

    • joshuatorres10
      New Member
      • Aug 2010
      • 2

      #3
      line 120 means it's the check value of the radio button..
      then if it's the one being chose, it should add to the value of extrovert but if "eib" is chosen, it should add to the value of introvert..but it's not calculating..th anks man...

      Comment

      • johny10151981
        Top Contributor
        • Jan 2010
        • 1059

        #4
        line 120 means it's the check value of the radio button..

        This is a bug in your program. I think your php.ini settings file "display_errors " is off. set display_errors= on restart your apache server. And then try to understand what i have told you.
        there is no such constant called eib(at least my php version, the latest one, dont support it)

        Comment

        • TheServant
          Recognized Expert Top Contributor
          • Feb 2008
          • 1168

          #5
          You can compare variables to variables, or variables to strings. You are not doing either in that line. If eib is a string that is chosen it should be:
          Code:
          if ($q1=="eia")

          Comment

          Working...