Location: PHPKode > scripts > Comments script with pagination > comm/config.php
<?php
// Comments Script - www.coursesweb.net/php-mysql/
// start session (if isn't started), and header for utf-8
if(!isset($_SESSION)) session_start();
if(!headers_sent()) header('Content-type: text/html; charset=utf-8');

// HERE add you data for connecting to MySQL database (MySQL server, user, password, database name)
$cmysql['host'] = 'localhost';
$cmysql['user'] = 'root';
$cmysql['pass'] = 'passdb';
$cmysql['bdname'] = 'dbname';

// Set administrator login data, and e-mail
define('CMANAME', 'admin');                      // the admin name to login
define('CMAPASS', 'pass');                       // the admin password to login
define('CMAMAIL', 'hide@address.com');         // Here add the Administrator e-mail

// If you want than only the logged users to can add comments, sets $addcomm to 0
// And sets $_SESSION['username'] with the session that your script uses to keep logged users
$addcomm = 1;
if($addcomm !== 1) {
  if(isset($_SESSION['username'])) $nameusr = $_SESSION['username'];
}
// For script settings
define('CMALLOWL', 1);                            // allows links in comments (1), not allow (0)
define('CMALLOWI', 1);                             // allows upload images in comments (1), not allow (0)
define('CMALLOWM', 1);                            // allows mail notification when new comment (1), not allow (0)
define('CMROWSPAGE', 12);                            // numbers of comments displayed in the page

// HERE you cand edit the permissions for the image uploded by User
$imguprule = array(
  'dir' => 'commimg/',                // directory to store uploded images
  'allowext' => array('gif', 'jpg', 'jpe', 'png'),        // allowed extensions
  'maxsize' => 200,       // maximum allowed size for the image file, in KiloBytes
  'width' => 800,         // maximum allowed width, in pixeli
  'height' => 600         // maximum allowed height, in pixeli
);

include('texts.php');             // file with the texts for different languages
$clsite = $en_csite;               // Gets the language for site

// removes additional tags, and external whitespace from GET and POST
if(isset($_GET)) {
  $_GET = array_map("strip_tags", $_GET);
  $_GET = array_map("trim", $_GET);
}
if(isset($_POST)) {
  $_POST = array_map("strip_tags", $_POST);
  $_POST = array_map("addslashes", $_POST);
  $_POST = array_map("trim", $_POST);
}

include('class.BaseCM.php');              // the main class from which the others are extended
Return current item: Comments script with pagination