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 
Advance poll  XML
Forum Index » Support Forum
Author Message
Anonymous



When I've added the following text to my page? then what?
It just displays the script text.
Not the poll. Or should i save the index file in php????

Thanks


<?php
/* Include this before your html code */
include "./poll_cookie.php";
?>

--------------------------------------------------------------------------------
<?php

/* path */
$poll_path = "/home/joshi/public_html/db";

require $poll_path."/include/config.inc.php";
require $poll_path."/include/$POLLDB[class]";
require $poll_path."/include/class_poll.php";
$CLASS["db"] = new polldb_sql;
$CLASS["db"]->connect();

$php_poll = new poll();

/* the first poll */
echo $php_poll->poll_process(1);


/* the second poll */
$php_poll->set_template_set("simple");
$php_poll->set_max_bar_length(80);
echo $php_poll->poll_process(2);


/* the third poll */
$php_poll->set_template_set("popup");
if ($php_poll->is_valid_poll_id(3)) {
echo $php_poll->display_poll(3);
}

?>
Anonymous



Same issue here
micky2k2
Newbie

Joined: 05/12/2002 06:32:52
Messages: 2
Location: Newcastle upon Tyne, UK
Offline

You do need to change the extension from .html to .php if you are using php in the page.
[WWW] aim icon [MSN] [ICQ]
Ulrich
Beginner

Joined: 11/03/2003 12:13:33
Messages: 6
Offline

Mine doesn't work either. I've enabled PHP. Two questions:

1. In

<?php
/* Include this before your html code */
include "./poll_cookie.php";
?>

do you substitute the relative path to poll_cookie.php for "./poll_cookie.php"?

2. The script text seems to be set up for the db version. What do you use for the textfile version? I've looked and can't find anything in the files I downloaded.

Thanks!
Anonymous



Ulrich wrote:Mine doesn't work either. I've enabled PHP. Two questions:

1. In

<?php
/* Include this before your html code */
include "./poll_cookie.php";
?>

do you substitute the relative path to poll_cookie.php for "./poll_cookie.php"?

2. The script text seems to be set up for the db version. What do you use for the textfile version? I've looked and can't find anything in the files I downloaded.

Thanks!


1. use the full path
You can get it from the admin

2. It doesn't matter what you use
textfile and db use the same config
Ulrich
Beginner

Joined: 11/03/2003 12:13:33
Messages: 6
Offline

Thanks for the response!

It's still not working. I put:

<?php
include "/www/hm/j/jkalb/poll/poll_cookie.php";
?>

in before all html coding, and stuck

<?php
/* path */
$poll_path = "/www/hm/j/jkalb/poll";
require $poll_path."/include/config.inc.php";
require $poll_path."/include/$POLLDB[class]";
require $poll_path."/include/class_poll.php";
$CLASS["db"] = new polldb_sql;
$CLASS["db"]->connect();
$php_poll = new poll();
/* the first poll */
echo $php_poll->poll_process(1);
/* the second poll */
$php_poll->set_template_set("simple");
$php_poll->set_max_bar_length(80);
echo $php_poll->poll_process(2);
/* the third poll */
$php_poll->set_template_set("popup");
if ($php_poll->is_valid_poll_id(3)) {
echo $php_poll->display_poll(3);
}
?>

in the body of the page that is to include the poll. The page has the *.php suffix. Then when I go to the page in my browser it stops loading at the point where the second code snippet appears.

Any ideas?
Ulrich
Beginner

Joined: 11/03/2003 12:13:33
Messages: 6
Offline

Got it working! Found the code to insert on the page in another post.

Don't understand though why the distribution doesn't include an explanation of what to put on the page to make the poll show up.
Anonymous



This script looks good but unfortunately there is absolutely no information on how to setup it up correctly on your page....

Got it working! Found the code to insert on the page in another post.



Can you share what you found out? Or post a link to it please?

-tag
Ulrich
Beginner

Joined: 11/03/2003 12:13:33
Messages: 6
Offline

Go to:

http://www.proxy2.de/forum/viewtopic.php?t=1668
keepone
Newbie

Joined: 02/06/2003 00:44:40
Messages: 1
Offline

sorry but the topics doesn't work.

so what can i do to show the poll ?
Does it need a php extension ?

thanks
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum