<?php
//start a session
session_start();

// db properties:
$dbhost 'localhost';
$dbuser 'user'
$dbpass 'password';    
$dbname 'database';

//define the directory where to put images:
define('BOOKS_DIR','/director/to/the/images/of/the/books/');

//define the width of an icon:
define('icon_WIDTH'100);

//in the case of failure to connect to the database:
$conn mysql_connect ($dbhost$dbuser$dbpass) or die ("Could not connect to the database: " mysql_error());

//in the case of success or of failure to select a  database:
mysql_select_db ($dbname) or die ("Could not select the database '$dbname': " mysql_error());
?>