poll directory settings.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Hajduk
Forum Newbie
Posts: 12
Joined: Wed Aug 27, 2003 11:55 am

poll directory settings.

Post by Hajduk »

Ok, I downloaded this free script somewhere and I am trying to get it running on my server, but not in my root directory but in a directory called /poll/

I need to put in the following code in my page to display the poll and afterwards the result

Code: Select all

<?php

include_once ("includes/miniPoll.class.php");

$test = new miniPoll;

$test->pollForm();

?>
<?php

include_once ("includes/miniPoll.class.php");

$test = new miniPoll;

if (isset($_GET&#1111;'poll']) && is_numeric($_GET&#1111;'pollid'])) &#123;
	$pollid = $_GET&#1111;'pollid'];

	if (isset($_GET&#1111;'voteid']) && is_numeric($_GET&#1111;'voteid'])) &#123;
		$voteid = $_GET&#1111;'voteid'];
		$test->processPoll($pollid, $voteid);
	&#125;

&#125;
if (isset($_GET&#1111;'pollid'])) &#123;
	$pollid = $_GET&#1111;'pollid'];
	$test->pollResults($pollid);
&#125;

?>
Now I tried editing the directories but get a blank screen. If anyone could tell me how to put the directory correct in php I am very glad. I was thinking about e.g.

Code: Select all

include_once ("/poll/includes/miniPoll.class.php");
but this doesnt work.

Thnx in advance
Post Reply