If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Messages posted by: Gandalf
Forum Index » Profile for Gandalf » Messages posted by Gandalf
Author Message
Thanks, but that is the code I have been using and it still doesn't work.
Thanks for your help. I've sorted the pop-up now. But I can't get the poll to include in a page unless I rename the page with a .php extension, which is a pain when I need to run Server Side Includes on the same page. Can you help with this, please.

BTW, the poll referred to in previous posts of mine is no longer on line.
Thanks. It's just that the documentation that came with the script is not very helpful if you're new to PHP. What you suggested makes sense, but what I'm struggling with is that the codes mnetioned there in admin are OK if you rename the page to index.php but I need them as index.shtml as I have several SSI includes operating on the page.

The <!--#include virtual... doesn't work and trying to embed the poll in the table using <?php include_once "/usr/home/g/a/gateway/public_html/poll/booth.php";
echo $php_poll->poll_process(x); // x = Poll ID
?>

doesn't either.

There must be a solution!
I've searched this forum and cannot find what I need. I am totally new to PHP and just want to know how I display the poll on a page. I have created the polls and really, really don't understand how I'm supposed to display the poll. I have tried the SSI include but get an error. I've looked at the demos. What code do I have to use? Do I have to cut and paste it, as SSI doesn't seem to work? I would prefer SSI as I've used it before and seems like the minimum hassle.

Please help, but keep it simple.
Thanks for your reply, but I don't understand what you mean.

I created a file called my_poll.php as follows:

<?php
include "/usr/home/g/a/gateway/public_html/poll/poll_cookie.php";

/* path */
$poll_path = "/usr/home/g/a/gateway/public_html/poll/polldata";

require $poll_path."/usr/home/g/a/gateway/public_html/include/config.inc.php";
require $poll_path."/usr/home/g/a/gateway/public_html/include/$POLLDB[class]";
require $poll_path."/usr/home/g/a/gateway/public_html/include/class_poll.php";

$CLASS["db"] = new polldb_sql;
$CLASS["db"]->connect();

$php_poll = new poll();

/* poll */
if (isset($HTTP_GET_VARS['poll_id'])) {
echo $php_poll->poll_process($HTTP_GET_VARS['poll_id']);
} else {
echo $php_poll->poll_process("random");
}

?>

But get an error when I try. Perhaps you would have a look again? www.gatewayministries.co.uk/poll5.shtml

Go easy on me, would ya. Do you need to be rude? I mean, "fix your stupid poll5.shtml". I may not understand this as much as you do, but there's no need to be rude. I'm experimenting and came looking for help, not criticism. Thanks.
The link is www.gatewayministries.co.uk/poll5.shtml, and it will open in a pop-up window.
Yeah, I'm having the same problem but I'm running it on a UNIX server. So it can't just be a W2K problem.

Help us out here.
I can now actually create new polls but when I vote I get "Poll ID Does Not Exist!" displayed. If I then close the window (it's in a pop-up window) and then refresh the (index) page I get the results of the survey as normal. The poll definitely exists.

When I try to create a new poll, I get this:

"Warning: fopen("/usr/home/g/a/gateway/public_html/poll/polldata/1", "w") - Permission denied in /usr/home/g/a/gateway/public_html/poll/admin/index.php on line 177

Warning: Supplied argument is not a valid File-Handle resource in /usr/home/g/a/gateway/public_html/poll/admin/index.php on line 178

Warning: Supplied argument is not a valid File-Handle resource in /usr/home/g/a/gateway/public_html/poll/admin/index.php on line 186

Warning: Supplied argument is not a valid File-Handle resource in /usr/home/g/a/gateway/public_html/poll/admin/index.php on line 186

Warning: Supplied argument is not a valid File-Handle resource in /usr/home/g/a/gateway/public_html/poll/admin/index.php on line 189"

I have no idea what this means and am getting tired of trying to configure this.

Hey Catzwolf, I'm so glad you posted that 'cos the readme is not very helpful.

I was able to log-in before that but the problem I have is getting the ssi call to display anything on the page. I have named the page with a .shtml extension and normally can call using <!--#include virtual="" --> without any problem. Only this time I get '[an error occured while processing this directive]' no matter what path I use.

Any thoughts?
 
Forum Index » Profile for Gandalf » Messages posted by Gandalf
Go to:   
Based on the open source JForum