Polls/PHP/HTML - Newbie

Polls/PHP/HTML - Newbie

Posted by: lmabee
Posted on: 2006-07-03 09:38:00

Salutations Dreamhost Comrades ^_^
I am in serious need of your knowledge and help. I am a newbie to PHP. I would like to use a poll on my website, but alas. It says that " (polls _only_ work in .php files)"

Unfortunately, I don't know a lick of PHP, or how to go about adding this poll. I've tried to add the PHP code in an HTML page, and renaming in .php (I know, I am a noob).. and needless to say it didn't work for me.

How does one go about putting a poll on my page?

I really appreciate all your time and patience with my noob question. I can imagine a lot of you are laughing at my ignorance. wink

Thank you so very much,
Laura Mabee

Edit: For the record, this is my code:

<?php
// Important! You have to include it before your html code
include_once "/home/.destimona/lmabee/frozentears.org/polls/poll_cookie.php";
?>

<html>
<body>
<?php
include_once "/home/.destimona/lmabee/frozentears.org/polls/booth.php";
echo $php_poll->poll_process(5);
?>
</body>
</html>

But this is the result I get.

Re: Polls/PHP/HTML - Newbie

Posted by: norm1037
Posted on: 2006-07-03 11:47:00

You might want to post the location where you got the PHP code from if that is possible. That may help someone to suggest something that may help. Especially if it is a PHP4 script not designed to run under PHP5.


I take it you have also installed the two PHP scripts to the location shown?

What happens if you just create poll.php with:-

<?php
include_once "/home/.destimona/lmabee/frozentears.org/polls/poll_cookie.php";
include_once "/home/.destimona/lmabee/frozentears.org/polls/booth.php";
echo $php_poll->poll_process(5);
?>

Without any HTML just to see what happens.
And, placing it in /home/.destimona/lmabee/frozentears.org/polls

Then browse to http://<website>/polls/poll.php






--
Norm

Opinions are my own views and not the views of DreamHost.shocked
Any advice offered by me should be acted upon at your own risk.

Tags: php htmlphp codephp filesdreamhostunfortunatelypollnoobpollsappreciateignorancepatienceimaginelotadd