Author |
Message |
17/07/2003 17:12:09
|
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.
|
|
17/07/2003 17:42:13
|
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)
|
|
17/07/2003 17:54:51
|
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>
|
|
17/07/2003 18:16:06
|
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);
?>
|
|
17/07/2003 20:50:51
|
Anonymous
|
The number 4 it's the ID of your poll...get it?
I hate dreanweaver, just use a plain html editor
|
|
19/07/2003 18:29:31
|
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>
|
|
19/07/2003 19:14:49
|
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?
|
|
19/07/2003 19:15:51
|
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);
?>
|
|
20/07/2003 08:49:06
|
Anonymous
|
rename your main site eg. index.html --> index.php
index.htm --> index.php
change the file type into php. that worked for me.
|
|
20/07/2003 18:54:05
|
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.
|
|
20/07/2003 19:56:09
|
Anonymous
|
How can I set people to vote again(means not only 1 vote only)
|
|
20/07/2003 21:29:06
|
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.
|
|
22/07/2003 13:03:51
|
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...
|
|
22/07/2003 18:06:20
|
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.
|
|
22/07/2003 20:09:58
|
fove
Beginner
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 |
|
|