muscle Posted June 30, 2008 Share Posted June 30, 2008 hi all, i installed the poll but i have a problem in the moment that the people want post a coment is it: //function to check that there is no HTML in the comment field. function screenForm($field_value){ $stripped = strip_tags($field_value); if($field_value!=$stripped) { // something in the field value was HTML return false; } else return true; } Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home3/user/catalog/pollbooth.php:11) in /home3/user/catalog/includes/functions/sessions.php on line 102 Fatal error: Call to undefined function: screenform() in /home3/user/catalog/pollbooth.php on line 16 here is the cod.. poll <?php require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/pollbooth.php'); $location = ' : <a href="' . tep_href_link('pollbooth.php', 'op=results', 'NONSSL') . '" class="headerNavigation"> ' . NAVBAR_TITLE_1 . '</a>'; DEFINE('MAX_DISPLAY_NEW_COMMENTS', '5'); if (($HTTP_GET_VARS['action']=='do_comment')&& (screenForm($HTTP_POST_VARS['comment']))) { Link to comment Share on other sites More sharing options...
Guest Posted July 1, 2008 Share Posted July 1, 2008 Below is the fix to the first issue, if you work out the cache limiter bit let me know! open pollboot.php on catalog at the top of the file you look like this: //function to check that there is no HTML in the comment field. function screenForm($field_value){ $stripped = strip_tags($field_value); if($field_value!=$stripped) { // something in the field value was HTML return false; } else return true; } correct whit this <?php //function to check that there is no HTML in the comment field. function screenForm($field_value){ $stripped = strip_tags($field_value); if($field_value!=$stripped) { // something in the field value was HTML return false; } else return true; } ?> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.