Author |
Message |
|
I figured it out! This problem was actually very simple. I should have investigated it just a little more before making my last post. Here's what I did:
In the administration panel for Advanced Poll, I went to the Templates. In the template for Poll View, I added some code to the "form" tag in "display_head".
It was originally like this:
I added some code:
Thanks!
ordinary1
|
|
|
I have worked on my code, and it is mostly working. However, I have another problem: No one can vote. Everything appears to work great; it's just that when you try to vote, it never shows up in the results. Here's the code I have:
For index.php, I now include mainleftwindow.php in the left table cell and mainrightwindow.php in the right table cell. I also include the PHP file for a cookie at the beginning of index.php...the cookie works great; in fact, when someone votes, the result of their vote is not stored, but the cookie is properly stored on their computer preventing them from trying again (without removing the cookie, of course). However, I am using IP checking also, but I assume that is neither here, nor there.
Here is mainleftwindow.php:
mlw_archiveslist.php merely contains an informational message.
mlw_pollslist.php contains a table containing a list of links to polls, their results, and their comments. Here is how the links are coded:
Here is mainrightwindow.php:
mrw_archives.php merely contains an informational message.
mrw_polls.php contains the code to display the polls, and their results. Here is how it is coded:
After the last echo before the }, there is an if-else structure employing JavaScript to display information based on $poll_id, but I don't believe this has anything to do with the problem.
Thanks for any advice, helpful comments, etc.!
ordinar1
|
|
|
Carbonize wrote:If only sessions were that simple lol
Do you think that this is not the solution?
Or do you just think that implementing sessions is easier said than done?
|
|
|
I'll look into this. Thanks, Auron!
ordinary1
|
|
|
I still need some help, please.
|
|
|
Auron wrote:Do you get any errors?
In mainleftwindow.php try the 5 without ' and '. I think integers don't require quotes. Otherwise they may (i think) get interpreted as char's.
Auron
No, I do not get any errors. The integer vs. char issue makes sense, but taking out the quotes made no difference.
Carbonize wrote:Shouldn't make a difference. Variables in PHP are very variable unless defined.
What you're saying appears to be correct.
ordinary1
|
|
|
I know the feeling. However, if you do have any advice later, I would greatly appreciate it.
ordinary1
|
|
|
Carbonize wrote:You missed off the third option. YOU ARE TO IMPATIENT TO WAIT MORE THAN 3 1/2 HOURS.
"I AM TOO IMPATIENT..."
I don't understand exactly what you're saying, but if you're suggesting that I'm too impatient because I've only waited 3 1/2 hours for a reply...look at the date of my original post again. I've been waiting since Sunday.
ordinary1
|
|
|
Apparently, my question is one of two things:
1) Too difficult for everyone that has viewed it.
2) Not interesting enough for anyone to care to help.
I don't know which one I would rather it be, but I hope someone will be smart enough and interested enough to offer some help.
Whoever you are, thanks in advance!
ordinary1
|
|
|
This is a problem concerning PHP:
I have a table with two cells beside each other. I want to include PHP files in each cell so that I can make changes to each file, rather than the main file that contains the table. The file included in the left cell will contain links. I want the file included in the right cell to contain polls, but I do not have it that way now...I would be happy with whatever as long as I don't have to make changes to the main file.
The idea is: A user should be able to click any link in a list in the left cell, and the appropriate poll will display in the right cell. I want links on the left for the poll, its results, and its comment. I also want a poll's results link and comment link with it in the right cell. I've been able to make the links (in the left cell) actually display the correct poll, but when I click the link (in either cell) to show the results for the same poll, it shows the results for the wrong poll...this is always the same poll's results no matter which results link I click.
Following is the code in the main PHP file:
index.php
in the left cell:
in the right cell:
Following is the code in the file to go in the left cell:
mainleftwindow.php
Any help would be appreciated.
Thanks!
ordinary1
|
|
|