Need Help with PHP Surveyor

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • coffeegourmet
    Second Lieutenant

    • Feb 2007
    • 124

    Need Help with PHP Surveyor

    I installed the PHP Surveyor found in my Fantastico panel on my My Coffee Gourmet site. I installed it to a "survey" directory. It installed okay I think so I created a survey. When I tried activating it and going to it, it came up with:

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
    I have no idea what it means. The admin panel tells me that the url for my survey is http://mycoffeegourmet.com/survey/index.php?sid=1

    Does anyone have an idea as to why this is happening?

    Also on a side note, is there a way to make this or any surveys in Fantastico a pop up when they click off my site? I would love to do that.
    My Coffee Gourmet -I offer discounts to forum members, so pm me for the discount code!

    We Have Picnic Baskets - Your stop for picnic baskets, picnic backpacks, NCAA Logo Merchandise and more! PM me for a discount code!

    "What you not give up, No one can take from you!" - Our motto from our two month long strike this summer!
  • coffeegourmet
    Second Lieutenant

    • Feb 2007
    • 124

    #2
    Re: Need Help with PHP Surveyor

    Okay I went and changed surveys anyhow... I am now using the PHPESP survey from Fantastico. I think it will look better because it will go right on my site.

    However, I am getting a PHP error when I publish, any ideas on how to fix it?

    Here is the script that it said to put in the html box on the page:

    <?php $sid=2; include("/home/kngxsdql/public_html/mycoffeegourmet/survey//public/handler.php");?>
    To see the page and the error go here:



    I do still want a pop up survey as well if anyone has done it before.
    My Coffee Gourmet -I offer discounts to forum members, so pm me for the discount code!

    We Have Picnic Baskets - Your stop for picnic baskets, picnic backpacks, NCAA Logo Merchandise and more! PM me for a discount code!

    "What you not give up, No one can take from you!" - Our motto from our two month long strike this summer!

    Comment

    • Watdaflip
      Major General

      • Sep 2005
      • 2116

      #3
      Re: Need Help with PHP Surveyor

      The problem is being caused by the script trying to send the page headers, but it isn't being executed until after the page send the headers. Probably the easiest way to fix it would be to copy and paste the code from the file that is getting included, so you can move the code that has to be executed before any output, and then still have the content display where you want it.

      Sorry its hard to explain. Before you go through the trouble you might want to just try placing that code on a blank page and uploading it to your website, and then using a frame, or iframe linked to that page.

      Register/Login Script
      Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

      Comment

      • coffeegourmet
        Second Lieutenant

        • Feb 2007
        • 124

        #4
        Re: Need Help with PHP Surveyor

        Okay so what you are saying is that is connected to my header being in php? If that is the case, could I not just put the header as an image, and the code should execute than? Or is it all my of my php that is causing it (header, footer, menu, specials)? What if I did not use php all, just make an html page with the same look and feel as the rest of the site?

        In the alternative, you mention something about frame or Iframe, how do you do that? That is a term that I am not familiar with.

        Edit to add: the script for the survey is contained an html box on the page, not in the "View Page HTML" part, if that clarifies or makes a difference in things.
        Last edited by coffeegourmet; 10-12-2007, 05:05 AM. Reason: Forgot to add something
        My Coffee Gourmet -I offer discounts to forum members, so pm me for the discount code!

        We Have Picnic Baskets - Your stop for picnic baskets, picnic backpacks, NCAA Logo Merchandise and more! PM me for a discount code!

        "What you not give up, No one can take from you!" - Our motto from our two month long strike this summer!

        Comment

        • navaldesign
          General & Forum Moderator

          • Oct 2005
          • 12080

          #5
          Re: Need Help with PHP Surveyor

          It is hard to explain, as Watdaflip said. because not only it has to do with headers already been sent out, but also because you have to use a div to set the position in the page. By headers we don't mean the ones you created in php, we mean the output to the screen, caused anyway by your html code. You see, your script uses sessions, and sessions need to be sent out before anything else. An iframe would be the easiest solution to solve your problem.
          Navaldesign
          Logger Lite: Low Cost, Customizable, multifeatured Login script
          Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
          DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
          Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

          Comment

          • coffeegourmet
            Second Lieutenant

            • Feb 2007
            • 124

            #6
            Re: Need Help with PHP Surveyor

            Okay I figured out how you do an iframe but it asks for a url, what do I put in there for the survey to make it come up? I tried putting in the php code but that didn't work either. Please help!
            My Coffee Gourmet -I offer discounts to forum members, so pm me for the discount code!

            We Have Picnic Baskets - Your stop for picnic baskets, picnic backpacks, NCAA Logo Merchandise and more! PM me for a discount code!

            "What you not give up, No one can take from you!" - Our motto from our two month long strike this summer!

            Comment

            • navaldesign
              General & Forum Moderator

              • Oct 2005
              • 12080

              #7
              Re: Need Help with PHP Surveyor

              The URL of your suvey script, probably http://mycoffeegourmet.com/survey
              Navaldesign
              Logger Lite: Low Cost, Customizable, multifeatured Login script
              Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
              DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
              Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

              Comment

              • coffeegourmet
                Second Lieutenant

                • Feb 2007
                • 124

                #8
                Re: Need Help with PHP Surveyor

                Naval,

                I tried that but it didn't work.. now the page is coming up completely blank! Maybe I should just try an external link to it, and forget about putting it on a web page altogether?
                My Coffee Gourmet -I offer discounts to forum members, so pm me for the discount code!

                We Have Picnic Baskets - Your stop for picnic baskets, picnic backpacks, NCAA Logo Merchandise and more! PM me for a discount code!

                "What you not give up, No one can take from you!" - Our motto from our two month long strike this summer!

                Comment

                • navaldesign
                  General & Forum Moderator

                  • Oct 2005
                  • 12080

                  #9
                  Re: Need Help with PHP Surveyor

                  Not sure. The link http://mycoffeegourmet.com/survey takes me to a login page, the same should also appear in the iframe.
                  Navaldesign
                  Logger Lite: Low Cost, Customizable, multifeatured Login script
                  Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                  DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                  Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                  Comment

                  • coffeegourmet
                    Second Lieutenant

                    • Feb 2007
                    • 124

                    #10
                    Re: Need Help with PHP Surveyor

                    Okay now this is weird! I tried 3 or 4 times today to get it to work, it is blank! I try typing in http://www.mycoffeegourmet.com/survey.php and BINGO now it comes up!! I guess it just didn't click right away or something! I should be okay now though!
                    My Coffee Gourmet -I offer discounts to forum members, so pm me for the discount code!

                    We Have Picnic Baskets - Your stop for picnic baskets, picnic backpacks, NCAA Logo Merchandise and more! PM me for a discount code!

                    "What you not give up, No one can take from you!" - Our motto from our two month long strike this summer!

                    Comment

                    Working...
                    X