Author |
Message |
|
It is because you did not name your page .php Anytime you are using php you have to name it .php rather than .htm or .html.
|
|
|
For future reference any page that has php script on it must be named .php
As far as putting it anywhere on a page, just do the same thing you would do if you wanted a table.
<table width="125" align="right" cellspacing="0">
<tr>
<td>
<?php
include_once "/blah/blah/blah/booth.php";
echo $php_poll->poll_process("random");
?>
</td>
</tr>
</table>
You just have to align your table. You could also do it in a layer if you wanted to.
|
|
|
I am not sure what you mean by embed it in an html file. It is a php script, and as such it has to be embedded in a page that is named something.php. You can still have html present. Just create a table in dreamweaver mx and align it to the right (use the property inspector). Then put that snipit of code into it and it will work fine. You could also do it in a layer.
HTH
Matt
|
|
|
Have you tried:
<!--#include virtual="/polls/poll_ssi.php?poll_id='random'" -->
Note the single quotes.
Tracy wrote:
Sorry above statement is wrong, this is the call to ssi that I use and it always shows poll ID #1 instead of random...
<!--#include virtual="/polls/poll_ssi.php?poll_id=random" -->
|
|
|
To be honest with you I am not sure why it is refreshing to another page. It could be with how you have your system set up. I would search through every document and see what you can find.
As far as putting the poll or different polls on different pages that would be fine. I do not see any reason as to why it wouldn't work. You just need to put the two tiny pieces of code into each document.
|
|
|
For future reference ANYTIME you are using PHP in your page, you MUST name that page .php
DrJOnes666 wrote:
I'v efound the answer to my question.
It seems that in order to work, the file extension must be set to .php and not .html or .shtml .
I sure wish there was a DETAILED Manual somewhere on the site.
DrJOnes666
|
|
|
Have you tried adding this line of code before the standard code on your webpage?
$php_poll->set_template_set("default");
NOTE: You can pick which template you want to use. You might be using "popup"
So the coding on your page should now look like this:
<?php
include_once "blah/blah/blah/booth.php";
$php_poll->set_template_set("default");
echo $php_poll->poll_process("random");
?>
Also, if you create a poll and then click on the view all polls in the admin you should notice a text document icon at the end of each poll. If you click on that icon it will give you the exact code to get that poll to show up on your webpage. Don't forget to include the thing at the top as well.
HTH
Matt
Mike wrote:
Have 2.0.2 running fine inside a pop-up....would rather display on page with <style type="text/css">, cell, borders, etc. which is causing display problems with borders, etc. Would appreciate code to place http://fmhs.net/poll.php on http://fmhs.net , instead, and drop the pop-up.
Can not figure it out...any help appreciated.
thanks,
mike@fmhs.net
|
|
|
Daniel-
If you read the readme file located in either the DB or textfile section it will get you going. Basically upload everything to your server. Change your config file and add the correct password, username, and DB name. Then go to your webbrower and run the install.php file. Once it is setup you can go to the admin folder, admin/index.php, and set everything up from there. Once you have created a poll if you click on the view all polls button, at the end of each poll will be some icons. Click on the one that looks like a text file, and that is the code to insert to run the poll on your webpage. If you want it random, or the newest one, click on the help book, and it will show you how to there.
HTH
Matt
Daniel Morris wrote:
I'm an HTML/PHP novice here trying to set up a poll. I've searched everywhere for some kind of instructions on how to go about getting up and running but haven't had any luck.
My first question is what code I have to put in the html page to make it display the poll. Secondly, what is the difference between the textfile and db directories? What do I put (and where do I put it) in my public_html directory? And finally, how I go about personalizing it all...
|
|
|
Is that you are sending it to a different page than the one that the poll is actually on. You are going from http://www.4gigs.com/~maccrazy, and when it refreshes it is trying to load http://www.maccrazy.com This might be nothing, but it could be the problem. Also it is not displaying a "Microsoft" error because of your O/S. It is displaying it because of the browser you are using I think.
|
|
|
Believe it or not I just ran across this problem and spent the better part of an hour trying to figure it out. The code that you need to change is actually located in your database. If you open your database you should see a template table. In that table there are 4 or 5 comment rows. You need to edit the background color in each one depending on which template you use. Mine was in the default template, but I changed them all for less hastle in the future.
HTH
|
|
|