Config
Config
php
<?php
session_start();
// db properties
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = '';
$dbname = 'gallery';
// an album can have an image used as thumbnail
// we save the album image here
define('ALBUM_IMG_DIR', 'C:/webroot/gallery/images/album/');
// all images inside an album are stored here
define('GALLERY_IMG_DIR', 'C:/webroot/gallery/images/gallery/');
// When we upload an image the thumbnail is created on the fly
// here we set the thumbnail width in pixel. The height will
// be adjusted proportionally
define('THUMBNAIL_WIDTH', 100);
// make a connection to mysql here
$conn = mysql_connect ($dbhost, $dbuser, $dbpass) or die ("I cannot conn
ect to the database because: " . mysql_error());
mysql_select_db ($dbname) or die ("I cannot select the database '$dbname
' because: " . mysql_error());
?>