<?php
include('../../veza/le.php');
// Initialize the session
session_start();
if(!isset($_SESSION["username"])){
header("Location: ../");
exit(); }

function get_safe_value($accounts,$str){
	if($str!=''){
		$str=trim($str);
		return mysqli_real_escape_string($accounts,$str);
	}
}

function valid($key) {
	
    $result = strtolower($key);

    $result = trim(preg_replace("/\s+/", "_", $result));
    $result = html_entity_decode( $result, ENT_COMPAT, "UTF-8" );
    $result = preg_replace("/\s/", "_", $result);

    return $result;
}
?>