Polls/PHP/HTML - Newbie

software development

#1

Salutations Dreamhost Comrades :slight_smile:
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"; ?> <?php include_once "/home/.destimona/lmabee/frozentears.org/polls/booth.php"; echo $php_poll->poll_process(5); ?>

But this is the result I get.


#2

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:///polls/poll.php


Norm

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