PHP poll results question

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

    PHP poll results question

    I'd like to put up two polls on my web site on a single page. I will be
    using a free remotely hosted poll service. That part is easy.

    But I want to remove the two individual <a href> links that have to be
    clicked to call the current results individually and replace them with a
    single link that will be used to call the results of both pages and
    display them at the same time, most likely in a table.

    Can PHP be used to do this? How would I have to write it to get the two
    poll results to display one beneath the other using only a single link
    click?





  • Epsilon

    #2
    Re: PHP poll results question

    JDJones <seebelow@spryn et.com> wrote in news:ui6Hb.2268 $d4.1751
    @newsread1.news .atl.earthlink. net:
    [color=blue]
    > I'd like to put up two polls on my web site on a single page. I will be
    > using a free remotely hosted poll service. That part is easy.
    >
    > But I want to remove the two individual <a href> links that have to be
    > clicked to call the current results individually and replace them with a
    > single link that will be used to call the results of both pages and
    > display them at the same time, most likely in a table.
    >
    > Can PHP be used to do this? How would I have to write it to get the two
    > poll results to display one beneath the other using only a single link
    > click?
    >
    >[/color]

    Are the results stored on that remote hosted service? If so you may be very
    limited in how you can configure things.

    Comment

    • JDJones

      #3
      Re: PHP poll results question



      Epsilon wrote:[color=blue]
      > JDJones <seebelow@spryn et.com> wrote in news:ui6Hb.2268 $d4.1751
      > @newsread1.news .atl.earthlink. net:
      >
      >[color=green]
      >>I'd like to put up two polls on my web site on a single page. I will be
      >>using a free remotely hosted poll service. That part is easy.
      >>
      >>But I want to remove the two individual <a href> links that have to be
      >>clicked to call the current results individually and replace them with a
      >>single link that will be used to call the results of both pages and
      >>display them at the same time, most likely in a table.
      >>
      >>Can PHP be used to do this? How would I have to write it to get the two
      >>poll results to display one beneath the other using only a single link
      >>click?
      >>
      >>[/color]
      >
      >
      > Are the results stored on that remote hosted service? If so you may be very
      > limited in how you can configure things.[/color]

      Yes they are. To get the results, a link such as <a
      href="http://www.webpollcent ral.com/v2/?id=1234&user=m yusername"></a>
      has to be clicked.

      Comment

      • CountScubula

        #4
        Re: PHP poll results question

        > >>I'd like to put up two polls on my web site on a single page. I will be[color=blue][color=green][color=darkred]
        > >>using a free remotely hosted poll service. That part is easy.
        > >>
        > >>But I want to remove the two individual <a href> links that have to be
        > >>clicked to call the current results individually and replace them with a
        > >>single link that will be used to call the results of both pages and
        > >>display them at the same time, most likely in a table.
        > >>[/color][/color][/color]

        Wouldnt it just be easier to write your own poll page instead?

        Or are you looking to join a poll that is internet wide (same poll
        used on other sites as well)?


        Mike Bradley
        http://gzen.myhq.info -- free online tools for php

        Comment

        • JDJones

          #5
          Re: PHP poll results question



          CountScubula wrote:[color=blue][color=green][color=darkred]
          >>>>I'd like to put up two polls on my web site on a single page. I will be
          >>>>using a free remotely hosted poll service. That part is easy.
          >>>>
          >>>>But I want to remove the two individual <a href> links that have to be
          >>>>clicked to call the current results individually and replace them with a
          >>>>single link that will be used to call the results of both pages and
          >>>>display them at the same time, most likely in a table.
          >>>>[/color][/color]
          >
          >
          > Wouldnt it just be easier to write your own poll page instead?
          >
          > Or are you looking to join a poll that is internet wide (same poll
          > used on other sites as well)?[/color]

          I have no database access on my site so I need to use a remotely hosted
          server for the poll. The polls are custom to my need, not internet wide.

          Comment

          • CountScubula

            #6
            Re: PHP poll results question

            > I have no database access on my site so I need to use a remotely hosted[color=blue]
            > server for the poll. The polls are custom to my need, not internet wide.[/color]

            Ok, gotcha, if what I am getting is right, you want to display the
            result of two pages on one page, is this correct?

            if so, you can do a type of virual frame, where you set up a table
            with two colloms, and each gets a page pull from the other site.

            use a simple
            str_replace ("http://othersite.com/page,
            "http://mysite.com/page",
            $pageContents);
            before show the results

            or

            your script pulls the page and parses the data.

            Would you be so kind as to post a link to the voting page, or someone
            elses on the same sytem, so I can see it, becouse what you want is
            easily done, but I need to be clear on the task.

            Mike Bradley
            http://gzen.myhq.info -- free online php tools

            Comment

            • JackM

              #7
              Re: PHP poll results question



              CountScubula wrote:
              [color=blue][color=green]
              >>I have no database access on my site so I need to use a remotely hosted
              >>server for the poll. The polls are custom to my need, not internet wide.[/color]
              >
              >
              > Ok, gotcha, if what I am getting is right, you want to display the
              > result of two pages on one page, is this correct?[/color]

              That's correct.
              [color=blue]
              > if so, you can do a type of virual frame, where you set up a table
              > with two colloms, and each gets a page pull from the other site.
              >
              > use a simple
              > str_replace ("http://othersite.com/page,
              > "http://mysite.com/page",
              > $pageContents);
              > before show the results
              >
              > or
              >
              > your script pulls the page and parses the data.
              >
              > Would you be so kind as to post a link to the voting page, or someone
              > elses on the same sytem, so I can see it, becouse what you want is
              > easily done, but I need to be clear on the task.[/color]

              http://www.webpollcentral.com/v2/?id=9815&user=wvnh would be one of the
              links to show the results.

              Comment

              • Epsilon

                #8
                Re: PHP poll results question

                JDJones <seebelow@spryn et.com> wrote in
                news:RZpHb.3214 $d4.1375@newsre ad1.news.atl.ea rthlink.net:
                [color=blue]
                >
                > I have no database access on my site so I need to use a remotely
                > hosted server for the poll. The polls are custom to my need, not
                > internet wide.
                >[/color]

                You don't need a database to operate a poll. You can easily use plain text
                files to store data. Of course a database would be preferrable, but if you
                don't have access to one, text files will work just fine. If it was my
                site, I would much rather do that than resort to a remotely hosted
                solution.

                Comment

                • CountScubula

                  #9
                  Re: PHP poll results question

                  > http://www.webpollcentral.com/v2/?id=9815&user=wvnh would be one of the[color=blue]
                  > links to show the results.[/color]



                  Is this what you want?


                  If so, thee source is at http://gzen.myhq.info/test/vote_src.php


                  Mike Bradley
                  http://gzen.myhq.info -- free inline php tools

                  Comment

                  • JDJones

                    #10
                    Re: PHP poll results question



                    CountScubula wrote:[color=blue][color=green]
                    >>http://www.webpollcentral.com/v2/?id=9815&user=wvnh would be one of the
                    >>links to show the results.[/color]
                    >
                    >
                    >
                    >
                    > Is this what you want?
                    > http://gzen.myhq.info/test/vote.php
                    >
                    > If so, thee source is at http://gzen.myhq.info/test/vote_src.php
                    >
                    >
                    > Mike Bradley
                    > http://gzen.myhq.info -- free inline php tools[/color]

                    Yes, exactly! Thank you Mike. I appreciate it.

                    Comment

                    • CountScubula

                      #11
                      Re: PHP poll results question

                      Your Welcome :)

                      There is a BASE HREF= in the code, this is so the relative links (like all
                      the images) can be referenced to the correct site, and not your site.


                      --
                      Mike Bradley
                      http://gzen.myhq.info -- free online php tools


                      Comment

                      Working...