473,414 Members | 1,697 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

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?

Jul 17 '05 #1
10 3235
JDJones <se******@sprynet.com> wrote in news:ui6Hb.2268$d4.1751
@newsread1.news.atl.earthlink.net:
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?


Are the results stored on that remote hosted service? If so you may be very
limited in how you can configure things.
Jul 17 '05 #2


Epsilon wrote:
JDJones <se******@sprynet.com> wrote in news:ui6Hb.2268$d4.1751
@newsread1.news.atl.earthlink.net:

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?

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


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

Jul 17 '05 #3
> >>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.


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
Jul 17 '05 #4


CountScubula wrote:
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.

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)?


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.

Jul 17 '05 #5
> 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.


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
Jul 17 '05 #6


CountScubula wrote:
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.

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


That's 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.


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

Jul 17 '05 #7
JDJones <se******@sprynet.com> wrote in
news:RZ****************@newsread1.news.atl.earthli nk.net:

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.


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.
Jul 17 '05 #8
> http://www.webpollcentral.com/v2/?id=9815&user=wvnh would be one of the
links to show the results.


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
Jul 17 '05 #9


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



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


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

Jul 17 '05 #10
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
Jul 17 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Doug Holton | last post by:
George W Bush, as certified by Florida's election commission. Which decorator syntax do you like the most? See http://wiki.wxpython.org/index.cgi/PythonDecoratorsPoll A. @classmethod def...
28
by: Paul McGuire | last post by:
Well, after 3 days of open polling, the number of additional votes have dropped off pretty dramatically. Here are the results so far: Total voters: 55 (with 3 votes each) Votes for each choice...
0
by: Adam Twardoch | last post by:
Hello, Is there a method, or an alternative module that could be used, to have "polls" in Plone that display detailed results of the poll, i.e. all users and the votes they have given? Adam
4
by: Mario | last post by:
Hello everybody, Does anybody know how i make a script to make a poll? I mean a small poll when you can choose yes or no? -- -------"""------- ---()--- °?----(_)-----?° | Greetz Mario|
1
by: Dave | last post by:
I am looking for a JavaScript poll/survey script that meets the following criteria: 1) Just a large number of Yes/No questions (at least 20) 2) "Repeat vote-proof" 3) "Display Results" button...
0
by: Rocky Moore | last post by:
I have not bothered with the repeater control over the last couple of years. Thought I might try to start using it, but it seemed like it was more work to use than it would solve in the situations...
5
by: pbd22 | last post by:
Hi. I am trying to poll a long-running process via a hidden IFrame. I am noticing that the online errata gives advice for handling a server response: window.parent.handleServerResponse(); ...
1
by: audiokarate | last post by:
Alright this is my hw problem. I am a newb with java and I am having a hard time coding. This is the problem and at the bottom is what I have so far. Any pointers in the right direction is greatly...
0
by: Jean-Paul Calderone | last post by:
On Tue, 6 May 2008 08:44:36 -0700 (PDT), Giles Brown <giles_brown@hotmail.comwrote: With the most recent release, the IOCP reactor is in much better shape than it ever has been before. It's not...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.