Chi Kien Uong
Geranienstraße 30
71034 Böblingen
Deutschland / Germany
|
If you are not registered or logged in, you may still use these forums but with limited features.
Show recent topics
|
|
|
Author |
Message |
10/05/2004 08:12:48
|
Anonymous
|
I am trying to make the poll dynamic based on a variable set in the path of the page.
Here is how I'm passing the variable:http://www.xyz.com/poll/db/test.php?ThePollValue=10&ThePollSize=10
THE PROBLEM:
I get the poll questions, but when I click on "view results" or "vote" I lose the variable value and get the following error: "Poll ID does not exist. "
Here is the code in my php page:
<?php
$string = $_SERVER['QUERY_STRING'] ;
$var = explode("&", $string);
$varA = explode("=", $var[0]);
$ThePollValue = $varA[1];
$ThePollSize = $varA[2];
$ThePollValuePass = strval($ThePollValue);
/* path */
require "./booth.php";
$php_poll = new poll();
$php_poll->set_template_set("plain");
$php_poll->set_max_bar_length($ThePollSize);
echo $php_poll->poll_process($ThePollValuePass);
?>
|
|
12/05/2004 22:58:49
|
Anonymous
|
you need to know the right path that may be is this
/www/poll/db/booth.php
|
|
|
|
|
|
Based on the open source JForum
|