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 
Updating the Poll on the index page  XML
Forum Index » Support Forum
Author Message
amayar
Newbie

Joined: 16/03/2003 20:40:31
Messages: 3
Offline

I embedded the code for the popup template on my index page...

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

Does anyone know how to update the poll ID (in this case 13) automatically?? Every time I create a new poll I have to go to the code and change the number manually
Anonymous



$php_poll->set_template_set("popup");
echo $php_poll->poll_process("newest");
amayar
Newbie

Joined: 16/03/2003 20:40:31
Messages: 3
Offline

I tried that, but It only displays the latest results??? not the poll...

weirdddd ...... I'll try again .....

Thanks
Anonymous



$newid = $php_poll->get_latest_poll_id();
$php_poll->set_template_set("popup");
if ($php_poll->is_valid_poll_id($newid)) {
echo $php_poll->display_poll($newid);
}
Anonymous



where do I have to set that ??
it only says me :

Fatal error: Call to a member function on a non-object in /home/ruechami/www/zorg/poll/index.php on line 42
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

Anonymous wrote:$php_poll->set_template_set("popup");
echo $php_poll->poll_process("newest");


That should work.

Have a look at the demo polls on this site by...

Free Scritps -> Adv. Poll Demo -> look at polls AND the code.

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum