<?php
session_start();
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past


define("DATABASE_NAME", "student3");
define("DATABASE_USER", "student");//student
define("DATABASE_PASS", "student007");//student007
//define("absolute_path", "/var/www/virtual/www.sors.si/student/student3");
define("WEBABS", "/");
define("TABLES_PREFIX", "");
//define("HTTP","http://student.sors.si/student3");
 
$SQLconnection = mysql_pconnect("localhost",DATABASE_USER,DATABASE_PASS);

if(!$SQLconnection) {
    echo "MySQL database connection failed (user: ".DATABASE_USER.", database name: ".DATABASE_NAME.")')</script>";
}
else {
    if(mysqli_connect_errno()) {
        echo "<script>console.info('MySQL database connection failed (user: ".DATABASE_USER.", database name: ".DATABASE_NAME.")')</script>";
    }
    else {
        mysql_select_db(DATABASE_NAME);
        mysql_query("SET NAMES 'utf8'");
        //echo "<script>console.info('MySQL database connection success (user: ".DATABASE_USER.", database name: ".DATABASE_NAME.")')</script>";
    }
}
//echo "<script>console.info('db init done')</script>";
function clean($a){ return mysql_real_escape_string($a);}
?>