webbuilder? Hi,
I have installed AdvancedPoll, I am up to the part where I need to insert some php code into my page.
Just wondering how to do this, it doesn't seem to work when just pasting in the html on web builder
When I paste into the html on webbuilder, it changes <?php and ?> to ?>
which stuffs up the code and shows as text on the site.
PHP Code:
<?php
/* Include this before your html code */
include_once "./poll_cookie.php";
?>
______________________________________
<?php
/* path */
$poll_path = dirname(__FILE__);
require_once $poll_path."/include/config.inc.php";
require_once $poll_path."/include/$POLLDB[class]";
require_once $poll_path."/include/class_poll.php";
require_once $poll_path."/include/class_pollcomment.php";
require_once $poll_path."/include/class_captchatest.php";
$CLASS["db"] = new polldb_sql;
$CLASS["db"]->connect();
$php_poll = new pollcomment();
/* question */
echo $php_poll->get_poll_question(2);
/* poll */
$php_poll->set_template_set("plain");
$php_poll->set_max_bar_length(125);
$php_poll->set_max_bar_height(10);
echo $php_poll->poll_process(2);
/* construct the form */
$php_poll->set_template("poll_form");
$php_poll->set_form_error(array(
"name" => "Please enter your name.",
// "email" => "You must specify your e-mail address.",
"message" => "You must specify a message."
"captcha" => "You must specify the correct key."
));
$html_form = $php_poll->comment_process(2);
/* poll comments */
$php_poll->set_template("poll_comment");
$php_poll->set_comments_per_page(5);
$php_poll->set_date_format("d/m/Y H:i");
$php_poll->data_order_by("time","desc");
echo $php_poll->view_poll_comments(2);
echo $php_poll->get_comment_pages(2);
/* form */
echo $html_form;
?>
Also I will be making a different poll on each page. How and where do I put the code?
I would appreciate any help
I have installed AdvancedPoll, I am up to the part where I need to insert some php code into my page.
Just wondering how to do this, it doesn't seem to work when just pasting in the html on web builder
When I paste into the html on webbuilder, it changes <?php and ?> to ?>
which stuffs up the code and shows as text on the site.
PHP Code:
<?php
/* Include this before your html code */
include_once "./poll_cookie.php";
?>
______________________________________
<?php
/* path */
$poll_path = dirname(__FILE__);
require_once $poll_path."/include/config.inc.php";
require_once $poll_path."/include/$POLLDB[class]";
require_once $poll_path."/include/class_poll.php";
require_once $poll_path."/include/class_pollcomment.php";
require_once $poll_path."/include/class_captchatest.php";
$CLASS["db"] = new polldb_sql;
$CLASS["db"]->connect();
$php_poll = new pollcomment();
/* question */
echo $php_poll->get_poll_question(2);
/* poll */
$php_poll->set_template_set("plain");
$php_poll->set_max_bar_length(125);
$php_poll->set_max_bar_height(10);
echo $php_poll->poll_process(2);
/* construct the form */
$php_poll->set_template("poll_form");
$php_poll->set_form_error(array(
"name" => "Please enter your name.",
// "email" => "You must specify your e-mail address.",
"message" => "You must specify a message."
"captcha" => "You must specify the correct key."
));
$html_form = $php_poll->comment_process(2);
/* poll comments */
$php_poll->set_template("poll_comment");
$php_poll->set_comments_per_page(5);
$php_poll->set_date_format("d/m/Y H:i");
$php_poll->data_order_by("time","desc");
echo $php_poll->view_poll_comments(2);
echo $php_poll->get_comment_pages(2);
/* form */
echo $html_form;
?>
Also I will be making a different poll on each page. How and where do I put the code?
I would appreciate any help