Author |
Message |
31/05/2003 10:02:46
|
Anonymous
|
i put this code where i want the poll "<?php
include_once "/home/plays/public_html/poll/booth.php";
echo $php_poll->poll_process(4);
?> but when i view the page all i see is "poll_process(4); ?>" and not the poll. What am i doing wrong?
|
|
31/05/2003 18:08:59
|
Anonymous
|
Ah, you do'nt have the 'full' path from your server which should look something like:
/* path */
$poll_path = "/home/youraccount/yourusername/www.yoursite/public_html/poll";
presuming your directory is in public_html an called poll
This works ok on my site
<?php
/* Include this before your html code */
include "./poll_cookie.php";
?>
<?php
/* path */
$poll_path = "/home/youraccount/yourusername/www.yoursite/public_html/poll";
require $poll_path."/include/config.inc.php";
require $poll_path."/include/class_poll.php";
$php_poll = new poll();
/* the first poll */
echo $php_poll->poll_process(1);
|
|
31/05/2003 20:04:01
|
Anonymous
|
Nope still didn't work . This is what i have for my WHOLE page
"<?php
// Important! You have to include it before your html code
include_once "/home/plays/public_html/poll/poll_cookie.php";
?>
<html>
<body>
<?php
include_once "/home/plays/public_html/poll/booth.php";
echo $php_poll->poll_process(4);
?>
</body>
</html>"
|
|
01/06/2003 11:22:43
|
dante
Beginner
Joined: 28/05/2003 00:23:28
Messages: 5
Offline
|
Hi there again, are you using .php pages on your site or something else?
|
Dave the moose |
|
01/06/2003 22:11:24
|
Anonymous
|
I have some php pages on my site but the page i want to put polls on is html. I did the db install and it all works right. I just can't put any of the polls on my site.
|
|
02/06/2003 12:38:26
|
dante
Beginner
Joined: 28/05/2003 00:23:28
Messages: 5
Offline
|
Hi, sorry it's all a bit slow this...to use the script as you want to it has to saved .php - otherwise you can use an ssi call into a .shtml page ( as you will see in demo5..you will have to use one or the other - it will not work in .html/.htm pages
hope this helps
cheers
|
Dave the moose |
|
|