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 
Adding Advanced Poll to a Webpage...  XML
Forum Index » Support Forum
Author Message
Anonymous



I have created a servey and when I clicked on help it tells me to copy the code below in a html page

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

<html>
<body>
<?php
include_once "/home/pasfins/public_html/pool/booth.php";
echo $php_poll->poll_process(5);
?>
</body>
</html>

Now when I do this here is what I have on the page
poll_process(5); ?>


Help please, how should I copy the code...

Thanks
amber222
Graduate

Joined: 07/05/2004 21:13:07
Messages: 586
Offline

Your document needs to be .php, i.e., "polls.php", not "polls.html" and needs to be on a server that has php.
Anonymous



That's happening with me as well. But do I need to redo all of the page or can i just rename it?
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

Tim wrote:That's happening with me as well. But do I need to redo all of the page or can i just rename it?


you can just rename it.

open file in notepad. do 'save as' then type "filename.php" (including the quotes!). save. done!

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
Lyric
Beginner
[Avatar]

Joined: 25/09/2004 23:27:40
Messages: 22
Offline

it worked for me, except for one thing, its displaying another poll template, instead of the template i was using before
[WWW] [Yahoo!] [MSN]
Anonymous



is there anyway to embed it into an .html page without having to change it to a .php ?
Anonymous



Anonymous wrote:is there anyway to embed it into an .html page without having to change it to a .php ?

U can add it within <iframe> tag, as i did, but note that old versions of browsers may not show it properly.
http://surin.marketolog.biz/
Anonymous



Anonymous wrote:is there anyway to embed it into an .html page without having to change it to a .php ?

Why would you feel you have to do that? In case it's the index.html file you have to change, after creating the .php version, you can delete the .html version and every browser will take you to the .php.
Anonymous



I have the files saved as php one is poll.php the other is index.php (where I embedded the code) and I am still only displaying the (poll process 4) line

Should I leave it as booth.php or specify the actual poll?

Thanks
Anonymous



Nevermind, your comments and help paid off, I just needed a bit more elbow work. Thanks to all who left help.
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum