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 
Messages posted by: RiSkE
Forum Index » Profile for RiSkE » Messages posted by RiSkE
Author Message
The page including the poll is HTML or HTM, depending where you go, but my server provides PHP support in both. I just changed it all over to PHP, and there is no change.
Can't find anything wrong there. It's just got a title.

The following code is on the demo page. Do I actually need any of it besides the require poll_cookie.php bit? There is no mention of it on the side.

<?php
$poll_path = dirname(__FILE__);
if (eregi("WIN",PHP_OS)) {
$poll_path = str_replace("\\","/",$poll_path);
}
require "./poll_cookie.php";
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
?>
Actually, when I change it to what I said above, I get:

Warning: Cannot modify header information - headers already sent by (output started at /data/www/agn_38896/coa.ausut.com/html/index.html:20) in /data/www/agn_38896/coa.ausut.com/html/poll/poll_cookie.php on line 21

Very wierd.
Change it to what? If I make the require point anywhere else, all I get is errors because it can't load! I've made it require ("./poll/poll_cookie.php"); but that's just loading the exact same thing.

The problem is occurring in IE and Firefox, and a mate who I got to check it is having the same problem.
Whenever I vote, pressing refresh will prompt me to resend data, and my vote will be counted again. Also, if I reload (not refresh) the page, it asks me to vote again instead of displaying the results! Any idea what could be wrong?

The webpage is http://coa.ausut.com/index.html

I thought that having the poll data in a seperate folder might be the problem, but I tried a test file in the same folder, and had the same problem (http://coa.ausut.com/poll/test.htm).

I have figured out how to block an IP for a set number of hours, but that's not really much of a help. Surely the page should also be using cookies or similar to block users from re-posting their vote.

For reference, index.html includes side.htm (HTM is PHP enabled on my host), which has (in terms of relevant stuff):

<?php
require ("http://coa.ausut.com/poll/poll_cookie.php");
?>

<html><head>

//Script for date

</head><body>

//Table setup and titles, etc

<?php

$poll_path = "/data/www/agn_38896/coa.ausut.com/html/poll";

require $poll_path."/include/config.inc.php";
require $poll_path."/include/$POLLDB[class]";
require $poll_path."/include/class_poll.php";
$CLASS["db"] = new polldb_sql;
$CLASS["db"]->connect();

$php_poll = new poll();


echo $php_poll->poll_process(newest);

?>

//Rest of document

</body></html>


I have also tried putting the require poll_cookie line in the index.html file before the <html> tag, and the same in the test file in the poll directory, but with no luck.

Any help would be appreciated.
 
Forum Index » Profile for RiSkE » Messages posted by RiSkE
Go to:   
Based on the open source JForum