If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
advance poll  XML
Forum Index » Support Forum
Author Message
Anonymous



I should be installed advacne poll(php+my sql)

I succeed to go to www.kenoodlee.com/poll/db/admin and config
the topic in it...but i am wondering how can i place the vote to
my web site ?

add the coding to my index.htm ?

which part should i need to add into my index.htm (where can i find it)?
(since i have no idea on php coding)

Pls advice.
Anonymous



Place this
<?php
// Important! You have to include it before your html code
include_once "/usr/local/apache/htdocs/pollphp/textfile/poll_cookie.php";
?>
before your html code, and this:
<?php
include_once "/usr/local/apache/htdocs/pollphp/textfile/booth.php";
echo $php_poll->poll_process(4); // x = Poll ID
?>
where you want your poll to be
the number"4" it's the number of your poll ( might be 1, or 2 or whatver)
Anonymous



Am i right ? but it's doesnt work !
what is the meaning of "4" ?



<html>
<head><?php
"http://www.kenoodlee.com/poll/db/poll_cookie.php";
?>


</head>

<body><?php
include_once "http://www.kenoodlee.com/poll/db/booth.php";
echo $php_poll->poll_process(4); // x = Poll ID
?>



</body>
</html>
Anonymous



Maybe the problem is that i am using Dreamweaver to edit/add following
php code to the html file, that's why i cant show the poll..
pls advice any others way to do that ?


<?php
include_once "C:/Program Files/Apache Group/Apache2/html_public/textfile/booth.php";
echo $php_poll->poll_process(x);
?>
Anonymous



The number 4 it's the ID of your poll...get it?
I hate dreanweaver, just use a plain html editor
Anonymous



I have been reading everythign I can find to make this work and I have edited the code over and over.. but still it doensn't work in an html file. I can make it work if code is inserted into a php file. works like a champ then, but not with html.

Here's my code... Please advise, and it would be appreciated...
The only output I get on the screen is "poll_process(4); ?> "
I do have 4 as a survey. Thanks in advance.


<?php
// Important! You have to include it before your html code
include_once "/home/notarywe/public_html/poll/poll_cookie.php";
?>
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>

<body>

<p><?php
include_once "/home/notarywe/public_html/poll/booth.php";
echo $php_poll->poll_process(4);
?>
</p>

</body>

</html>
Anonymous



I can make it work with having everything in an php file, or .shtml file, but not just a .htm file.. as others have stated their index.htm/html

It's frustrating since it's a great little program, but a pain in the rump to get going.. installation is easy, but to get it inserted into our code on exsisitng sites is a real chore. I hope that someone has an answer, I would love to see a url, with a .htm file that loads this and possibly the source behind it.

Any takers?
Anonymous



I went to this users site, and they have the exact same issue.. and the same response of their file.. showing only.. the php code, and no survey!


kenoodlee wrote:Maybe the problem is that i am using Dreamweaver to edit/add following
php code to the html file, that's why i cant show the poll..
pls advice any others way to do that ?


<?php
include_once "C:/Program Files/Apache Group/Apache2/html_public/textfile/booth.php";
echo $php_poll->poll_process(x);
?>
Anonymous



rename your main site eg. index.html --> index.php
index.htm --> index.php

change the file type into php. that worked for me.
entoone
Newbie

Joined: 19/07/2003 19:19:15
Messages: 4
Offline

Yeah, I knew I could make it work with a php file, but really want to keep it an htm.. I wonder if it's even possible to have it work with an html/htm file.. or if it has to be a php file.
Anonymous



How can I set people to vote again(means not only 1 vote only)
entoone
Newbie

Joined: 19/07/2003 19:19:15
Messages: 4
Offline

turn off the monitoring I believe.. since it watches to see if someone has voted, and the timeframe etc.
Anonymous



entoone wrote:Yeah, I knew I could make it work with a php file, but really want to keep it an htm.. I wonder if it's even possible to have it work with an html/htm file.. or if it has to be a php file.


ermm....kinda a stupid question rly, everything between <?php and ?> are PHP codes, so they require a .php file extention, and most of all, a server that supports PHP files...

answer to your question is no, because it is impossible to have PHP coding in an HTML file. i do wonder why you even had to "wonder" that...
entoone
Newbie

Joined: 19/07/2003 19:19:15
Messages: 4
Offline

excuse me, it's not a stupid question.. since some sites (most I know) either use default.htm, index.htm etc for their opening (default) page.
Thus, it would be smart to put the poll on the first page a user comes to,
thus I would not consider it a stupid question. Since some people might actually want to make it work with their sites. Again, got a solution for this? Nope.. then.. err.. ???

Also, I do have other php applications that run from htm files and are inserted code into htm files, so it can work if coded properly.

So, really not a stupid question, infact as I'm sure many have h eard, there are no supid questions.... Only some stupid answers.
fove
Beginner
[Avatar]

Joined: 21/07/2003 21:31:13
Messages: 12
Location: Scotland
Offline

No need to get so defensive.

You do realise that an index.php or default.php would work in exactly the same way? My site's opening page is index.php and my poll is on the index page. Webdesign does not begin and end with html.

Also, I do have other php applications that run from htm files and are inserted code into htm files, so it can work if coded properly.


I don't see how that could be true. Are you sure it's not perl or cgi scripts?

fove
Wendy
[Email] [WWW] aim icon [MSN]
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum