Post by simkin on Feb 16, 2007 4:52:54 GMT -5
Dear support 
When I try to add the following code to create a template I get an Internal server error:
If I add simple HTML code the error is not displayed.
Is there a way around this?

When I try to add the following code to create a template I get an Internal server error:
If I add simple HTML code the error is not displayed.
<form action="<? echo $_SERVER['PHP_SELF']; ?>" onsubmit="return false" method="post">
<?
$pollerId = 3; // Id of poller
?>
<!-- START OF POLLER -->
<div class="poller" id="pollerstyle">
<div class="poller_question" id="poller_question<? echo $pollerId; ?>">
<?
// Retreving poll from database
$res = mysql_query("select * from poller where ID='$pollerId'");
if($inf = mysql_fetch_array($res)){
echo "<p class=\"pollerTitle\">".$inf["pollerTitle"]."</p>"; // Output poller title
$resOptions = mysql_query("select * from poller_option where pollerID='$pollerId' order by pollerOrder") or die(mysql_error()); // Find poll options, i.e. radio buttons
while($infOptions = mysql_fetch_array($resOptions)){
if($infOptions["defaultChecked"])$checked=" checked"; else $checked = "";
echo "<p class=\"pollerOption\"><input$checked type=\"radio\" value=\"".$infOptions["ID"]."\" name=\"vote[".$inf["ID"]."]\" id=\"pollerOption".$infOptions["ID"]."\"><label for=\"pollerOption".$infOptions["ID"]."\" id=\"optionLabel".$infOptions["ID"]."\">".$infOptions["optionText"]."</label></p>";
}
}
?>
<a href="#" onclick="castMyVote(<? echo $pollerId; ?>,document.forms[0])"><img src="http://www.feelinginbloom.nl/poller/images/vote_button.gif"></a>
</div>
<div class="poller_waitMessage" id="poller_waitMessage<? echo $pollerId; ?>">
Getting poll results. Please wait...
</div>
<div class="poller_results" id="poller_results<? echo $pollerId; ?>">
<!-- This div will be filled from Ajax, so leave it empty --></div>
</div>
<!-- END OF POLLER -->
<script type="text/javascript">
if(useCookiesToRememberCastedVotes){
var cookieValue = Poller_Get_Cookie('dhtmlgoodies_poller_<? echo $pollerId; ?>');
if(cookieValue && cookieValue.length>0)displayResultsWithoutVoting(<? echo $pollerId; ?>); // This is the code you can use to prevent someone from casting a vote. You should check on cookie or ip address
}
</script>
</div>
<div class="clear"></div>
</form>
Is there a way around this?